Category : wpf

I am setting my entire window to have the glass effect with this MARGINS margins = new MARGINS(); margins.leftWidth = -1; margins.rightWidth = -1; margins.topHeight = -1; margins.bottomHeight = -1; DwmExtendFrameIntoClientArea(hWnd, ref margins); However, whenever the window resizes or repaints. It reverts back to the original dimensions and makes the background black. Is there a ..

Read more

I recently changed to a new computer at work and now my development environment has a weird problem. WPF throws an exception while opening certain views. Note that these views/programs work fine with my old computer. Exception: EXCEPTION: Exception has been thrown by the target of an invocation. TYPE: System.Reflection.TargetInvocationException STACK TRACE: at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, ..

Read more

I try to re-style TextBoxes in my Control to have the same look for ReadOnly as if they were Disabled. Last week I could achieve this without any problem like this: <UserControl.Resources> <Style TargetType="{x:Type Border}" x:Key="TextBoxBorderStyle"> <Style.Triggers> <DataTrigger Binding="{Binding IsReadOnly, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TextBoxBase}}" Value="True"> <Setter Property="Opacity" Value="0.56"/> </DataTrigger> </Style.Triggers> </Style> </UserControl.Resources> … and use it ..

Read more

I try to use this interface IUIAutomationTextRange to get the foreground Color and background color of the TextBox. GetAttributeValue(UIA_ForegroundColorAttributeId, &ForeRGB); This function can get the foreground RGB of the control. GetAttributeValue(UIA_BackgroundColorAttributeId,&BackRGB);The BackRGB value of this function is always 0. I’m sure I set the background color of textbox to blue. Source: Windows Que..

Read more

I use the PositionChanged-Event from the Windows-Geolocator to display the users current location on a map. Everything works fine, but after about 15 minutes, the geolocator only returns positions that are quite old (30 seconds to one minute): Here is a snippet from my logfile: 2021-04-06 18:07:23,787 INFO [127:WindowsGnssPositionProvider:LocatorOnPositionChanged()] -> LocatorOnPositionChanged vom Geolocator: Long: xxxx, ..

Read more