wpftoolkit

WPF (MVVM): Closing a view from Viewmodel?

Hi there, Anybody come across a clever way of closing a view in a viewmodel using MVVM? Maybe there is a way of using binding to signal the view (window) to close? I would really appreciate any input anyone has. Basically i have a loginView that is bound to a loginViewModel, in the viewmodel (using binding on a command) i test to see...

Apply Office 2007 themes for WPF application.

I am using the RibbonControl from WPF toolkit. It has the Office Blue, Black and Silver themes. But the the theme is not applying for the controls in the window. Is there any solution for that? I am aplying the theme like <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/RibbonControlsLibrary;component/Theme...

What do I use for `BasedOn` when creating a custom style for a DataGridColumnHeader in WPF?

What should I put for BasedOn in this style? <Style x:Key="DataGrid_ColumnHeaderStyle" TargetType="wt:DataGridColumnHeader" BasedOn="??????????"> <!-- I want this to be a reference to the default style --> <Setter Property="BorderBrush" Value="{StaticResource Media_RaisedBorderBrush}" /> <Setter ...

How to reorder WPF Toolkit datagrid colums programmatically?

Hi! My application uses the WPF DataGrid control with custom columns. Although the property Columns is an ObservableCollection<>, the invocation of the method Move does not effect the order of the columns in any way. Can I somehow reorder the columns of a WPF Toolkit DataGrid programmatically? Best Regards Oliver Hanappi ...

wpf DatePicker control(WPF ToolKit)

I am using datepicker control from wpf toolkit. I need to center align the content in datepicker control. How can I achieve this? Tried VerticalContentAlignment="Center". It didn't work. Thanks ...

How to add Button to WPF Datagrid column dynamically ?

Hi .. Is there any way to dynamically add a button control(along with column name) to WPFDataGrid column,?? By clicking on header button,pop-up will open . this button generation is dynamic one ,which will be decided from code-behind, for some column headers need to add,for some not needed to add. ...

WPF Toolkit calendar control in a MVVM solution, how to highlight days?

From this article http://msdn.microsoft.com/en-us/magazine/dd882520.aspx I wanted to create a list of selected days like he did. Except my list is not static and putting it in the converter seems smelly. Has anyone done something similar with the WPF toolkit calendar control? Or are we trying to use this control for something more tha...

WPF ComboBox/ListBox with MultiSelect based on Enum with Flags

So I may be pushing the boundaries just a bit... Basically I have the following enum, declared in C# code: [Flags] public enum FlaggedEnum : int { Option1 = 1, Option2 = 2, Option3 = 4, Option4 = 8, ... Option16 = 32768, None = 0 } This enum is a member of an object which I have successfully bound to a Dat...

wpf toolkit, datagrid, comboboxcolumn

Hi In a datagrid I have two DataGridComboBoxColumns. The items of one of these columns should depend on what is selected in the other column. The underlying collection used to model this is a dictionary<string,List<string>>. How should i go about implementing this? I can't seem to hook up to any relevant events on the columns, and I ca...

WPF - Help with DataGrid's ComboBox column in UserControl

I have a MainWindow.xaml (which consists of a TabControl) and a few UserControls (which are loaded into the TabItems). One particular UserControl has a WPFToolkit DataGrid with custom columns (not auto-generated). One of these columns is a ComboBox-type column that binds to a property in my model called "Status". I also have an Enum for ...

Need help with a custom Style in WPF

I'm attempting to build some simple custom styles for the WPF Toolkit DataGrid control. I have a style for the overall DataGrid and a style for the DataGridColumnHeader. I am not setting any control templates, only basic properties. Here is what my sample DataGrid looks like with my custom styling applied: The header has the gradien...

WPF Datagrid. Get the values of each cell of the selected row.

I'm using the WPF toolkit datagrid. How can I get the values of the cells of the selected rows? Thanks ...

MVVM binding DataGrid (WPF Toolkit) to DataTable

I use MVVM for my project, the binding that set to DataTable work correctly at first time, but after I have update data on DataTable, it seem don't effect on DataGrid. Anyone know how to solving it? ...

WPF Toolkit DataGrid Multi-Select: How to get SelectedItems out?

I'm using the WPF Toolkit's DataGrid. I've enabled the property on the DataGrid to allow for multi-selecting of rows. How do I get the SelectedItems out? I'm using an MVVM framework to bind my ViewModel to my View. Thanks! ...

Binding to a UserControl's DependencyProperty

I'm trying to adapt a soltuion for the WPF toolkit's calendar from http://msdn.microsoft.com/en-us/magazine/dd882520.aspx but I'm having problems getting a binding on the usercontrol to work. I've tried using FindAncestor and ElementName, but I just get a binding error. I think it might have something to do with the tooltip and it's Dat...

How can I desaturate selected rows when DataGrid is out of focus?

The normal convention for UI controls is for selected text, items, or rows to be brightly colored (e.g., bright blue) when the parent control is in focus and desaturated/dim (e.g., pale blue) when the control is out of focus. In contrast to the ListView/GridView, the WPF DataGrid control does not follow this convention by default. Selec...

Need themes for the WPF Toolkit controls (espeically DataGrid)

I just downloaded the nice themes collection from the Codeplex WPF Themes site. I like the WhisterBlue and BureauBlue themes a lot, but neither contain any styles for the new controls included in the WPF Toolkit (DataGrid, DatePicker, and Calendar). It seems like someone out there must have extended the themes to cover these controls, b...

Command in a WPFToolkit DataGridTemplateColumn not working

im using the WPFToolkit's DataGrid and im trying to get an edit button working, here is the column: <my:DataGridTemplateColumn> <my:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock> <Hyperlink Command="{Binding EditVen...

How can I bind the nested viewmodels to properties of a control

I used Microsoft's Chart Control of the WPF toolkit to write my own chart control. I blogged about it here. My Chart control stacks the yaxes in the chart on top of each other. As you can read in the article this all works quite well. Now I want to create a viewmodel that controls the data and axes in the chart. So far I'm able to add a...

How do you port a theme from Silverlight to WPF?

It's "easy"! I just came across this blog post by Rudi Grobler that says it's "easy" to port a theme from Silverlight to WPF. Unfortunately, he doesn't say how to do it. Download and install I have installed both the WPF Toolkit and Silverlight Toolkit from Codeplex. I also went and dug up the source code for the theme I'm interest...