I'm trying to use the Microsoft ribbon control programatically using C#. Everything is fine but I'm unable to bind the command through the RibbonCommand. Can anyone give me an example of how to do this? My actual code is:
Ribbon rbn = new Ribbon();
RibbonTab file = new RibbonTab();
file.Name = "file"...
I've currently noticed that many people start using this model very often. Anyways, I think it's very correct to separate logic from presentation.
What more, some functionalities cannot be accomplished without it, or just very hardly.
Consider a Tree that is selectable, has search capabilities etc..
But in some cases, you don't need to ...
Let's have a button Command property bound to a custom command.
When should I implement ICommand and when derive from RoutedCommand? I see that RoutedCommand implements ICommand.
In which case could I need to iplement an ICommand?
What about MVVM model? Which one suits better for this purpose?
...
I have quite a large number of parent-detail ViewModels in my MVVM application. Something like this:
SchoolsViewModel
+- SchoolViewModel
+- LessonViewModel
+- PupilsViewModel
+- PupilViewModel
+- TeacherViewModel
+- PupilsViewModel
+- PupilViewModel
+- LessonsViewMo...
I am using the datagrid from WPF toolkit in a WPF windows application.
It has a datatemplate in the rowheader which creates a checkbox column used for selecting the rows.
If you click on the header row of the checkbox column (the top leftmost cell in the grid), it will check all the checkboxes in the grid thereby selecting all the rows....
I'm looking to display text with the wavey red lines where a word is misspelt, but I only want the text to be selectable, not editable. If I set the TextBox's IsReadOnly property to True or IsEnabled to False, the wavey red lines disappear and I can't get around it by putting something transparent as this will prevent the user being able...
Hi
I'm trying to style the header of a listview depending on hover/pressed/etc. events.
So far I tried a few things such as a trigger like the following but this does not work on my machine (a Vista Ultimate x64)
<Style x:Key="GridViewColumnHeaderStyle1" TargetType="{x:Type GridViewColumnHeader}">
<Style.Triggers>
<Trigger...
I am trying to find out if an EXE is a WPF app or a WinForms app. Any suggestions on how I can go about this?
I have heard that I could use the Reflector tool, if so how would this be done?
Thanks.
...
I noticed that ObservableCollection in WPF reflects changes in GUI only by adding or removing an item in the list, but not by editing it.
That means that I have to write my custom class MyObservableCollection instead.
What is the reason for this behaviour?
Thanks
...
Hi,
I've got a button strip usercontrol that I want to have on most of my forms.
I've added the commands as follows ...
public ICommand Create
{
get
{
return buttonCreate.Command;
}
set
{
buttonCreate.Command = value;
}
}
I've set these as dependency...
Hi Guys,
I have few questions as I am usign XAML for the first time.
How do I use the button (BrowseButton) to browse a folder in Harddrive ?
In this case as the button is inside
Can I use the way I have shown below?
Actually first dockpanel will hold the image and some label and the other dockpanel will have tabcontrol in it.
If I ...
Hi
I have a ListBox that is bound to a list of Persons. I want to show the items of the listbox in a grid. I can accomplish this with the code below, but the problem is that with this code each item has its own grid. I want one grid to contain all items so that each column in the grid is automatically scaled to the width of the longest ...
Hi,
there are many related questions/answers about that in SO. I took a look to some of them but none really match.
An assembly (called ResourcesLoader) holds images as embedded ressources.
I would like to use these pictures in another assembly.
After looking at msdn pack uri, and seeing a lots of samples, I thought that the followin...
I found some items regarding this questions on SO, but they do not satisfy me. They talk about INotifyProperyChanged, but that does not help in my case.
I have a Combobox.
For the ItemsSource, I use a MultiBinding and a Converter to create an ICollectionView. The ICollectionView gets bound to the ItemsSource.
On the GotFocus-event, thi...
I have the following Loaded event on my Window:
void Window_Loaded(object sender, RoutedEventArgs e) {
this.DataContext = new MyObject() {
MyDateTime = DateTime.Now,
MyNotEmptyString = "Not Empty",
MyNotUpperCaseString = "not upper case",
MyInteger = 20,
MyIntegerInRange = 1,
MyDouble ...
Ok, I'm trying to add a "custom property" to a piece of text in a RichTextBox control. I thought it would be easy, but apparently not :-)
The basic functionality I want is to be able to set a property on a particular word and be able to detect, when a word is double clicked, if that property is there or not.
My intial approach was to c...
Could you help me? I need a TreeView with a CheckBox at every item. I can't get it, I started like this, and seems like absolutely wrong way:
<TreeView Grid.Row="0" Grid.Column="0" Name="StagesTreeView" Margin="5">
<TreeView.Resources>
<Style TargetType="{x:Type TreeViewItem}">
<!-- <Setter Propert...
I have a Model-View-ViewModel implemented for a searchable ListBox.
My Xaml looks like this:
(Please ignore the fact what I'm doing inside, it's just for test purposes)
<ListView ItemsSource="{Binding Path=People}" >
<ListView.ItemTemplate>
<DataTemplate>
<Border>
<...
Hello,
I'm trying to add two Datatriggers to my WPF Window. Normally, this would work via adding
`<Style TargetType="{x:Type TextBlock}"></Style>`
to the Window.Resources.
In this case, I already have
`<ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Pr...
Can anyone actually download the RibbonControlsLibrary from the MS Office UI Fluent Site? (http://msdn.microsoft.com/en-us/office/aa973809.aspx)
I fill in the form, sign it, enter a name of my application (test) and it then redirects to a page saying "Page Cannot Be Found" from the following URL http://microsoftio.partnersalesresources....