wpf

PropertyChanged event testing: is this a good way?

Hello everyone. I'm developing WPF applications using MVVM pattern. I have ViewModel with code like this: public bool EditModeEnabled { get { return _EditModeEnabled; } set { _ModeEditModeEnabled = value; OnPropertyChanged("EditModeEnabled"); OnPropertyChanged("CommentTextBoxVisibility"); } } O...

Raising event in custom control.

Hi all, I'm writing a custom textblock control thats populate hyperlinks and raises event when clicked to hyperlink. I wrote this code but I got stucked. My code is : Imports System.Text.RegularExpressions Public Class CustomTextBlock Inherits TextBlock Public Event Klik As EventHandler(Of EventArgs) Public ReadOnly InlineCollection...

WPF Button to scroll Textbox

I have a RichTextBox and a button. Is there any easy way to make the textbox scroll down / up when i press the button? my guess is i have to use commands but im not 100% sure how commands work. ...

WPF - how to know whether window was closed by "x" button?

Hello, does anyone knows how to find out whether wpf window was closed by "x" button? ...

C#: Where would you put to-and-from-string conversion/translation-functionality?

I have some fairly simple (at least when you skip error checking, event stuff, et cetera) parameter classes. They are "assembled" kind of like this: public interface IParameter { Type ValueType { get; } object Value { get; set; } } public interface IParameter<TValue> : IParameter { new TValue Value { get; set; } } public a...

Useful WPF utilities

What are some useful utilities that help you when writing WPF applications? I know about Snoop for visual debugging of WPF applications at runtime, and Shazzam - a WPF pixel shader effect testing tool. I'd like to know about other such applications and what are they useful at. ...

WPF PropertyPath Issue - Cannot resolve all property references in property path

Hi, I'm struggling to get a PropertyPath to work - I've got a Transformation in the Window Resources that I'm trying to affect via a StoryBoard - also in Window Resources ... Heres the property path i'm using ... (Viewport2DVisual3D.Transform).(Transform3DGroup)[0].(RotateTransform3D).(RotateTransform3D.Rotation).(AxisAngleRotation3D....

How to bind XmlDataProvider.Source to MVVM property

I've got a treeview bound to an XmlDataProvider following this example. The app I am working on is following the MVVM pattern and the Xml is from a file that the user will open. When I try to bind the Source property of the XmlDataProvider like so <XmlDataProvider Source="{Binding Path=XmlFilePath}"/> I get a "Binding can only be app...

how to indicate when Column property "width" is changed on WPF DevExpress grid

Hello, does anyone knows how to indicate when Column property "width" is changed on this grid? It is no such event like ColumnWidthChanged in this grid... I want to save my widths of columns to database later, when tthis event is occoured. ...

WPF Trigger and StoryBoard Blues

Hi there. I'm having some trouble with making triggers do what I want them to... I have a control that needs to have a contextual menu and a checkbox appear when you mouse over them. Only thing is if the checkbox is checked it should remain visible. Basically I have 4 storyboards - two to show/hide the checkbox, and two to show/hide ...

WPF DevExpress TextEdit - " * " for Password input.

Hello, how I can use TextEdit component for passwords input?I want to se some "*" or "#" or another symbol when I type the password. Is there some property, where i can set such a thing? ...

Which files under Service References belong in source control. (Visual Studio)

Hi, I am new to both WPF and WCF, and have a WPF app that has a service reference to a WCF one. I have all sorts of files created under Service References/MyService. I am not so sure which need to go into source control and which don't. I have a .disco, a .datasource, a .wsdl, 3 .xsds, 2 configuration.svcinfos, a Reference.cs, and a Ref...

Using a DrawingImage as Icon for Multiple MenuItems

I have some icon resources as DrawingImages that is made up of many GeometryDrawings. I have File Menu items and toolbar buttons that use these images via resource bindings to MenuItem.Icon. Unfortunately, only one of the MenuItems show the icon. I am sure you can't assign a single DrawingImage resource to many MenuItem.Icon (or any...

Application.Current.Shutdown() doesn't

Title's about it. WPF app with some WCF stuff for IPC. I call Application.Current.Shutdown() and the app continues on happily. I thought Shutdown was supposed to be unstoppable. Perhaps because it's being called from a background thread? Do I need to do some dispatcher fiddling? ...

Problem adding image to Framework Element Factory WPF

I have a WPF application that uses a list view tree for navigation. In this tree, I have a listing of object types, so something similar to this: +Domain -Process -Procedure -Task -Object Name - Types Next to each object name on the right side is an edit icon. What I'd like to do is add an icon to the left of the object na...

How can I access my ResourceDictionary ???

I have a ResourceDictionary called CustomStyles.xaml within in my project. It is located in a subdirectory called RD, therefore its location is RD/CustomStyles.xaml. My question is the following: I have a class-only file called CustomGroupBox.vb, and in the New(), I would like to access resources from the ResourceDictionary. How can I ...

Styling Visual States

I am using the VisualStateManager from the WPF Toolkit. I've created a custom control, part of a reusable controls library, with numerous visual states. Now I want to allow the client of my library to easily restyle the fonts and colors of these visual states. What's the standard way of doing this? Must I require the client to replac...

WPF disable click on ComboBoxItem

I have a ComboBoxItem that acts strictly as a section title. Visually, I have it set but how do I eat the click when something is selected? I would prefer to accomplish this in xaml, if possible. TIA ...

WPF: PopUp on MouseOver of a ComboBoxItem

Does anyone know of an example of how to display a PopUp on MouseOver of a ComboBoxItem? TIA EDIT: I know how to create, style and position the PopUp but not how to display it! I may be retired. ...

DynamicResource not working, but StaticResource does ???

Here is the scenario: 1) Open Visual Studio 2008, create new project... 2) Select WPF Custom Control Library as the project type 3) Open the Generic.xaml resource dictionary located in the Themes folder 4) Add a simple brush such as: < SolidColorBrush x:Key="BackgroundBrush" Color="Yellow" / > 5) Change the Background property of t...