wpf-controls

HowTo define the "Auto" Width of the WPF GridView Column in Code?

I want to define the "Auto" width of a GridView Column in the code. How can i do that? var grid = (GridView)myListview.View; grid.Columns.Add(new GridViewColumn { Header = "My Header", DisplayMemberBinding = new Binding("MyBinding"), Width = ??? // Auto }); ...

wpf ContentPresenter wont enable/disable

Hi, I've overridden a ComboBox in order to add an extra button at the end of the combo - i'm using this to help navigate round my application. Its a M-V-VM App that has an Edit-Save/Cancel mechanism that disables or enables the controls depending on whether or not the user is in 'edit mode'. I wanted my navigation button to always be...

WPF :Inheriting styles for third party controls

Hi, I am using telrik components for wpf. I want to get "Select all" Check Box on Grid Header cell I have Common ResourceDictionary Style.Xaml , it has <ResourceDictionary xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"&gt; <Style TargetType="telerik:GridViewHeaderCell"> <Setter Property="FontWeight" Va...

Alternative of blur effect on DrawingVisual

I want to give a blur effect to my DrawingVisual. I can do this using BitmapEffect properties like: DrawingVisual drawingVisual = new DrawingVisual(); DrawingContext drawingContext = drawingVisual.RenderOpen(); var effect = new System.Windows.Media.Effects.BlurBitmapEffect(); effect.Radius = 10; drawingVisual.BitmapEffect = effect; Bu...

WPF : how to make a Parentwindow show multiple childwindows inside it to give a paging feeling to the user?

I want to create a parent window and host a couple of childWindows inside it, and show them according to user events: in other words: on parentWindow.load() event, i load the main Childwindow.. and according to the user's choices i unload/close , and then load a different childwindow. -all of that happening "inside" the parent window" -...

Animate Expander in WPF

How to animate the expanded and collapsed actions of a Wpf expander control? ...

Infragistics' XamDataGrid vs XCeed's WPF DataGrid Cons and Pros?

Infragistics' XamDataGrid & XCeed's WPF DataGrid are two free WPF DataGrids. What are some cons and pros of each and if you are familiar with both, why did you choose one over the other? ...

Parent TreeView Item ghost selected event!

Hello, I have a TreeView that launches a new window when each of its TreeViewItems Selected event is raised. <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Gr...

How to stretch the controls as per the page size in wpf

Hi, I have a listview of width set to Auto. When I run the windows app, it opens in normal size(not maximized). But when I maximize the window, the listview's width will be same and the space to its right is empty. normal size |_____________________| Maximized |_____________________|........... even though the window is now in full sc...

wpf Mouseclick on textbox

how to set the command and command parameter on mouseclick on textbox in xaml? ...

Set font properties in RichTextBox

HI, I am developing an editor using RichTextBox in WPF, i have to implement feature that user can set font of selected Text if some text is selected, if nothing is selected then font should be set for new text. If i set the font properties(like FontStyle,FontSize) of RTB in later case it will set the properties for whole text, How can i...

WPF ComboBox not responding to mouse

I have a very weird problem with a WPF ComboBox. On one computer (and only one) in our company the WPF ComboBox refuses to respond to mouse events when the ComboBox drop down is open. When the user clicks on the ComboBox to make the drop down appear and tries to select an item, he/she gets no hover effects from mouse over. When the user ...

WPF Toolkit Calendar Control - how to prevent next month scrolling?

When the calendar control provided in the WPF toolkit (and included in .Net 4) is displayed in "month view", it displays days from the previous and the next month, filling up the entire calendar. When you click on a day of the previous or next month, it will scroll a month backwards or forwards automatically. This behavior is throwing my...

WPF Animated Background Control?

In my WPF application, i want to have an ambient animated background similar to Media Center's background. Does anyone know of a free control that offers this? ...

Wpf Databinding within <UserControl.Resources>

I'm having an issue when triggering a storyboard from the code behind. I've just changed the storyboard to use a dependency property, which works, but only after the calling FindResource() twice. I build the dependency property using a UIPropertyMetadata object to set the initial value which appears to work. Does anyone know what I'm doi...

Make WPF RichTextBox accept only text and Set maximum length.

I want to restrict the my RichTextBox will only accept plan text, i. e user cannot allow to paste the image in it.also want to set maximum number of character allow in RichTextBox. How can i achieve this.? ...

Is it possible to create a WPF tab control template that looks nothing like a tab control?

What I'd like is a control that functions just like the tab control but instead of having the tabs along the top, the items would be displayed in a list box along the side. I imagine it's possible but haven't found any examples, I'm hoping there's someone here that's done something like this. ...

RibbonDropDownButton dynamically load item

Hey,I'm currently using the WPF Ribbon ctp RibbonDropDownButton and i'm binding to a collection to get from it all the items. The problem with that is that i can't add a command for each item in that way... (when an item is selected) I thought of an alternative to add the items when i click on the ribbon drop down button, but there isn'...

WPF Toolkit - Fit datagrid height to content height

Hello, I have a WPF datagrid and would like it's height to equal the sum of the heights of it's rows + header. i.e. if my datagrid header is 100px and I have 4 rows, each 50px in height the total height of my datagrid should be 300px. Is there a way of declaratively specifying that the height should match the sum of it's contents? T...

StackPanel with huge amount of children

i'm building a wpf control based on the outlook calender sample in code project, first of all i wanna know if this is a good sample or that this is not the way of writing controls? second, i need to support milliseconds view of the calender, the meaning of that is more than 24 * 60 * 60 items my question is how to build this panel(if...