wpf

Upload Image in WPF

i want to upload the image to the folder and the image bit and size want to store on the database, when i retrieve the image it want to compare in the folder and database ...

Binding converter as inner class?

I have a UserControl that uses a binding converter. I've made the converter an inner class of public partial class MyPanel : UserControl { public class CornerRadiusConverter : IValueConverter { How do I reference the Converter class from the XAML? The following does not work: <controls:MyPanel.CornerRadiusConverter x:Key="Cor...

What are the best characteristics of a datalayer framework for WPF/MVVM applications?

I am creating a WPF/MVVM framework which generates the code for the model classes. I'm planning to have for each database-table/web-service (e.g. "Customers") two model classes: a singular model class (e.g. "Customer") and a plural model class (e.g. "Customers") The singular model class has all of its properties (FirstName, LastNam...

Wpf - Receiving property value change notification for properties of a framework element

How to hook to the property value change notification for properties of a FrameworkElement? We are loading xaml at run time, and for each element in the visual tree, we need to hook up something to receive a property value change notification, when ever some one changes a property value of the element. What is the best way, if one exist...

How to change icon of msi installer package in vs2008 and change user interface screen after creating package for c# projects

Hi, I am trying to change the icon of msi installer package. I didnt found any solution for that. Also i tried to change user interface of msi installer package. I got some skins for that interface,but that is trail version.. Any one knows please help me regarding the above question. ...

Stop double click from happening after single click

Hi. I developing an application in WPF where a single click on an item will change the view to something else. The problem is that if the user double clicks on the item, the first event will be the single click that opens the other view and the next event will be the double click on the new view. This double click on the new view will c...

Creating a WPF front end for a Silverlight 3.0 application

I'm considering creating a WPF front end for a Silverlight application. Since Silverlight generally has the smaller subset of functionality this should be possible, but I'm not sure the best way to approach the problem. From the outset, let me say that I'm currently running the app out of browser but it lacks functionality like capturi...

WPF - ListBoxItem selection with LeftClick only

I have a ListBox with SelectionMode="Multiple", which allows me to select multiple rows by clicking either the left or right mouse buttons. How can I restrict the selection to occur from the LEFT mouse button click only? ...

Changing a Button's Click event based on a DataTrigger

Hi, I'm trying to change a Button's Click property/event when a DataTrigger is triggered but I'm not sure if this is the best method to do it. In fact, it won't even compile :) What I have looks like this: <Style TargetType="{x:Type Button}"> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=ObjectTreeView, Path=...

wpf navigate form to form?

In the entry form of my wpf application, I have a list of buttons where the user can select where he wants to do, eg. enter new customer, run report... What is the best way to show the form (e.g enter new customer) after the user selection? I don't want the form to be a pop up. Also hiding the current work and show the next form will ...

Getting events from the WPF Checked ComboBox

Near total WPF noob. So I hooked up a combobox to have checkboxes using the following item template: <ComboBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <CheckBox Checked="{Binding IsSelected}" Width="20" Name="chkDayName" Click="chkDayName_Click"/> <TextBl...

WPF Package Load Failure?

Package Load Failure Package 'Microsoft.VisualStudio.Xaml' has failed tot load properly. . . yadda, yadda, yadda. So now what? This package is somewhat important since I was hoping to do some WPF stuff this afternoon. Tried running without it and my XAML design view is gone. I already tried "devenv /resetsettings" from the command pro...

what does this error mean?

Hi All, I'm getting this error: Cannot use a DependencyObject that belongs to a different thread than its parent Freezable What does that even mean? Is it in English? Is the parent frozen, or is it just freezable? Any way to make a parent not freezable, if it makes the error go away? What's happening: I have two opengl winforms ...

Composite WPF Visual Studio Style Interface

I am looking to design an interface in the style of the Visual Studio interface with WPF Composite Application Guidance (PRISM). I would like to have a tree on the left with the different views that can be opened. When some one clicks on a node in the tree, have the view open on the right in a tab. If the view is already opened in the ta...

WPF access info from the containing Control

I have a UserControl(a) with a stackpanel which has its ItemSource set to a collection. The StackPanel then contains a set of UserControl(b) that contain a few buttons and a datagrid control. Is there a way from the code behind in the UserControl(b) to access properties in the code behind of the parent UserControl(a). Basically when Us...

Tunneling events stopping bubbling events

Hi all, I am looking at the new types events of WPF and I have come up against an issue. From the book I am reading tunneling events (all events that start with the word Preview) execute in the highest container and work their way down through the controls contained within... Ok. They also fire before their equivalent bubbling events.....

WPF memory fragmentation

Hi all, I've got what I assume is a memory fragmentation issue. We've recently ported our WinForms application to a WPF application. There's some image processing that this application does, and this processing always worked in the WinForms version of the app. We go to WPF, and the processing dies. Debugging into the library has th...

Slider On/Off Switch in WPF

Hi, I am looking for a WPF tutorial on creating a slide ON/OFF switch like on the iPhone. Here is an example (the "Send all traffic" option) https://secure-tunnel.com/support/software_setup/iphone/images/iphone_vpn_settings.jpg Any ideas? Cheers, Kevin. ...

WPF: How to import a resource from a child item

I would like to define two similar-looking views on some graphical data. One view is an editor and the other is a viewer that shows the data being transformed. I am not sure what the best way is to share code and resources between the two views, but I have tentatively decided to make a UserControl to represent the part of the visual pres...

How can I change textbox style in a textbox style data trigger?

I have created a default style for my textbox controls, but I would like to be able to change the style at runtime. I have a property that I want to bind to that informs the UI if the data is mandatory or not, and I want to be able to change the style of the textbox to another style that displays a red line under the textbox. I can't u...