wpf

New to WPF - What Control to Use / Getting Started?

I'm a WPF n0ob and I'm struggling with selecting the appropriate control to get the layout I want. What I'm trying to do is draw a bunch of squares (virtual post-it notes) onto the screen. Each note is going to be a decent size (~150 pixels or so) and there could be hundreds of these notes. I want the whole thing to be scrollable so t...

Triggering data validation in WPF

I have a problem in WPF with validation. I have a user control which has few textboxes, which are binding to datamodel. The validation is implemented with IDataErrorInfo. I want the validation to be triggered only when the user press the button "Submit data", so I used UpdateSourceTrigger="Explicit" with the binding of all those text...

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 ...

WPF ListView ScrollBar visible to false

Hi, Is it possible to force the horizontal (or vertical) scroll to NOT display even when needed? ...

Removing a WPF ListView's "classic" indented border

How can I remove the "classic" indented border from around my WPF ListView control? Setting its BorderThickness to 0 does not get rid of it. ...

WPF, WCF Seucity using ASP.Net Authentication

I am building an application that has a WCF service that a WPF and ASP.Net MVC client will connect to. I want to use the ASP.Net Membership providers for authentication for both the MVC and WPF clients. What is the best way to go about this? I have read a number of articles on-line (see below) and tried following them through but keep...

Fire WPF DataGrid edit from child element

You can refer to this question for background/explanation of what the context to my problem is. Basically, I have a WPF DataGrid bound to an ObservableCollection of an IEditableObject object. In a custom DataTemplate, for one of my columns that involves a flag enum property, I have constructed an Expander whose content is a bunch of che...

ValidationRule - validate on property update

Greetings, how can I validate if value in TextBlock is ok? I have a TextBox where I bind "Amount" property and a TextBlock which uses Multibinding: Price Property and Amount property. I would like to do something like that: In case of changing Amount i would like to validate if the price is greater than xx (which is the constant). Thank...

How do i get the control that is bound to a property in the ViewModel's end?

In WPF, how do I get the control (FrameworkElement) that is bound to a property in a viewmodel's end? I want to create a drop shodow effect on the control. ...

Add/Subtract GridLength in WPF

I have three columns containing two expanders in left and right columns. When both the expnders collapsed, I need to arrage the content in the middle column on the full window. For that I need to calculate the gridlengths. For Example GridLength w1= new GridLength( 20 ); GridLength w2= new GridLength( 50 ); GridLength w3= new GridLengt...

WPF and State Machine Pattern

Hi guys, I want to implement functionality that give possibility switch tabItems (TabItem1,TabItem2,TabItem3), when user click button "next" on the Form. And for that reason I'd like to use State Machine Pattern. These things I've already implemented, but I have no clue, is it right or not?: public abstract class State { #...

download Ribbon Control for WPF ???

From where should i download ribbon control ? ...

wpf button location

hi everyone. i am building an application. i have a button on a window. When i click the button, i want a new window popsup. but new window must open under button. As another way, when window popsup,button must been shown on window. How can i success that? is that possible? Thanks in advance.Lilly My codes as follows, private void T...

Receiving CommandParameter Value in MVVM

Hi, I am binding my command like: <Button Command="{Binding NextCommand}" CommandParameter="Hello" Content="Next" /> Here, I also bind its CommandParameter property, now how to fetch its value from NextCommand. public ICommand NextCommand { get { if (_nextCommand == null) { ...

What is the simplest way to display (and change) an image resource on a WPF dialog (using C++/CLI)?

I have a C++/CLI GUI application and I want to display an image as a visual aid for the user to see what step in a procedure they're at. This image will need to be changed each time the user selects the new step. Currently I'm using a picture box and have an image loaded from the disk at run time. So there are a few things I need to kno...

How can I make the code-behind of UserControls inherit a base class?

I've got a page manager that keeps a collection of pages (usercontrols), sends itself to each page which can thus call its SwitchPage method at anytime enabling me to put in links from one page to another. This works well and allows me to have a quick menu etc. public partial class PageManager : UserControl { private Dictionary<stri...

Creating thumbnails of a grid/WrapPanel or other UIElement in WPF

hellow, i have a grid with some images, i want to nake other grid that will be copy of this grid 'only smaller' i want that evry image i wiil add to the first grig will add also to the other grid/ if some one can help me. ...

WPF TabControl with Overflow Icons

I have 7 tabitems in my tabcontrol and the width of the tabcontrol is only 500. Therefore the tabitems are displayed in 3 rows. I want it to be shown in a dropdown at the end of the tabcontrol just like an overflow tabcontrol. How can I create it? ...

How could you enable a WPF application to create user controls on the fly?

How could you create an application that could search through a directory, find user controls in the form of paired .xaml / .xaml.cs files, and compile/execute these on the fly? Is this possible? Is there an .exec() or .compile() class somewhere that could do this? Basically what I want to do with this is have a WPF application that is ...

WPF Expanders Triggers

Hi! I have 2 expanders side by side. Only 1 can be opened at a time. I want to write Triggers for them directly in their definition like this: <Expander x:Name="MenuOverView" ExpandDirection="Left"> <Expander.Triggers> <Trigger Property="IsExpanded" Value="False" SourceName="MenuDet...