[WPF] Some paths was disappeared when scale canvas
When I add many Paths on canvas and zoom out canvas, some paths was disappeared. I execute on Window 10, 64 bit and .Net 4.7 Please let me know, why some paths was disappeared and solution for this issue. Thank you so much!
How to merge single binding validationrule errors to bindinggroup?
Example: <Grid> <Grid.BindingGroup> <BindingGroup x:Name="Group"/> </Grid.BindingGroup> <TextBox> <TextBox.Text> <Binding Path="Name"…
CommandBinding not set CanExecute will disable button.
If I create the CommandBinding with no CanExecute: CommandManager.RegisterClassCommandBinding(typeof(MyClass), new CommandBinding(MyCommand, MyCommandExecuted)); And set the command to a button: <Button Content="Click Me!"…
WPF MVVM - Unable to bind Model property directly to the IsEnabled Property of Button
Hello Team, Please find below View, ViewModel and Model class. I have binded collection of models (in ViewModel) to DataGrid control in the view. But based on UI selection, need to update another property in model. I am not able do to it via…
Dispatcher required for changing WPF bound properties?
Hello, From time to time I read some articles that state that if WPF binds to a property that implements INotifyProperyChanged, such property can be changed from any thread without a dispatcher, because WPF would automatically dispatch the…
c# : Get EventHandler Change Notification without Creating Instance or Making it static
c# : Get EventHandler Change Notification without Creating Instance or Making it static Public class A { public EventHandler KeyboardCloseEventHandlerTest; private void someMethod(object sender, EventArgs e) { …
Wpf TextBox Stroke and Stroke Thickness
How can I use Stroke and Stroke Thickness style options for text in TextBox? Or is there other editable control that has it? Cause I have OutlinedTextBlock with this options and I want editing to look the same.
How to ignore key and pass it next to the window?
I display WPF UserControl inside HwndSource. I want ignore certain keys from keyboard and ignore that keys, but pass it next to the host window or host application. That means, if spacebar key is pressed, WPF UsuerControl ignore it, but host application…
DataGrid with data won't fill parent's width
Hi, I met a very weird thing. I have a DataGrid in my WPF program. The overall setting for the DataGrid is as following: <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> …
WPF ComboBox binding
How can I make a ComboBox to display the selected item? I have following ComboBox declared in XAML: <ComboBox Margin="4 0 2 0"; ItemsSource="{Binding YAxes}" SelectedItem="{Binding SelectedYAxis,…
Binding to a DependencyProperty from a ControlTemplate
I have a UserControl with a DependencyProperty called "MyObject." In UserControl.Resources I have a ControlTemplate with a Rectangle and I'm wanting to change the Fill based on a Property in MyObject using DataTriggers. I'm just not sure how…
static resources color name
<sys:Double x:Key="Window.Main.Background" >1200</sys:Double> ///////////////////////////////////////////////////////////////////////////////////// <Window x:Class="DCAD.MainWindow" …
App won't come to the foreground when started
This is a MSDN question asked by Will Pittenger, the source is App won't come to the foreground when started. I have a WPF application that when I start it from Visual Studio, its main Window goes to the background rather than becoming the foremost…
Removing line chart datapoints where dependency property is null
This is a MSDN question asked by Mike Whalley, the source is Removing line chart datapoints where dependency property is null. I have a line and bar chart showing the monthly movement in a bank account and the account balance (cashflow) as illustrated: …
I want to be able to select a folder and search/print to a list the key phrase I've specified. Currently I can only do individual files. I'm a beginner.
This is a MSDN question asked by spum0n1, the source is I want to be able to select a folder and search/print to a list the key phrase I've specified. Currently I can only do individual files. I'm a beginner.. using System; using…
WPF Media Element - Weird Colors
This is a MSDN question asked by TheKapster, the source is WPF Media Element - Weird Colors. Hi, I've used different videos in different formats but for some reason the built-in media element is displaying weird colors. What's supposed to be…
TextBox. GetLineIndexFromCharacterIndex returns -1 when passing in large text
This is a MSDN question asked by moondaddy, the source is TextBox. GetLineIndexFromCharacterIndex returns -1 when passing in large text. The sample code below calls the GetLineIndexFromCharacterIndex method on the TextBox and it returns -1 when passing…
WPF How to load Dictionaries as Application does?
I am converting application in to DLL (CLassLibrary) and therefore I cannot use App.Xaml (Application). Inside my Dictionaries I use StaticResources for Storyboards and animations. Unfortunately it is not possible to use DynamicResources for Storyboards…
WPF tree view how do I add to the selected item
This is a MSDN question asked by WPF tree view how do I add to the selected item, the source is WPF tree view how do I add to the selected item. public List<TreeViewList> treelist = new List<TreeViewList>(); private void…
Starting a Program
This is a MSDN question asked by Warp_Speed, the source is Starting a Program. Hi People I am a beginner to programming and self taught, but I was wondering if people could give me there opinion: Best way to build a WPF C# Program 1) Build the Code and…