Relative Content

Tag Archive for c#wpfxaml

Text inside date picker is not center aligned (C#-XAML-WPF) [duplicate]

This question already has an answer here: What is the difference between “TextAlignment” and “HorizontalContentAlignment” in a XAML Textbox? (1 answer) Closed 17 days ago. I am using C# WPF XAML to create an application. One form has a date picker. I want to center align the text and the selected date inside the textbox […]

MenuItem Command not executing when defined through a style inside a ContextMenu

I am trying to create a file tree using a TreeView where I can bind a collection to. In order to bind to a TreeView you need to use a HierarchicalDataTemplate. This automatically uses the default TreeViewItem as its base. But I have no direct access to this TreeViewItem to add stuff to. This is why I am accessing the properties of this TreeViewItem using a style and setters.

MenuItem Command not executing when defined through a style inside a ContextMenu

I am trying to create a file tree using a TreeView where I can bind a collection to. In order to bind to a TreeView you need to use a HierarchicalDataTemplate. This automatically uses the default TreeViewItem as its base. But I have no direct access to this TreeViewItem to add stuff to. This is why I am accessing the properties of this TreeViewItem using a style and setters.

MenuItem Command not executing when defined through a style inside a ContextMenu

I am trying to create a file tree using a TreeView where I can bind a collection to. In order to bind to a TreeView you need to use a HierarchicalDataTemplate. This automatically uses the default TreeViewItem as its base. But I have no direct access to this TreeViewItem to add stuff to. This is why I am accessing the properties of this TreeViewItem using a style and setters.

MenuItem Command not executing when defined through a style inside a ContextMenu

I am trying to create a file tree using a TreeView where I can bind a collection to. In order to bind to a TreeView you need to use a HierarchicalDataTemplate. This automatically uses the default TreeViewItem as its base. But I have no direct access to this TreeViewItem to add stuff to. This is why I am accessing the properties of this TreeViewItem using a style and setters.

Button Command not firing in UserControl WPF MVVM

I have a button command that is binded to a RelayCommand AddCommand whose code is located in my MainViewModel.cs. The problem I’m facing is the button I need the command to fire in is located in a usercontrol SettingsView.xaml.