wpf

WPF How to design a multi-window Application?

Hi, im looking for some tips and hints how i can build up my Application in a good way. So here are some informations: I have at the moment the Mainwindow designed with a grid which holds 4 frames. its looking like this. At the top is a menu which let you select the different Pages. I have for the main area about 8 pages for e.g. a s...

Why does data binding to DynamicResource does not work?

The following code does not work. How do I make it working <Image Source="{DynamicResource {Binding VM.ImageKey}}" /> ...

wpf animation problem

i used this code to animation my window winLogin login = new winLogin(); login.Owner = this; login.Show(); DoubleAnimation da = new DoubleAnimation(); da.From = 0; da.To = this.Left + ((this.Width - login.Width) / 2); da.AutoReverse = false; da.Duration = new Duration(Time...

WPF equivalent of LVS_EX_ONECLICKACTIVATE?

I've got a WPF application with a ListBox in it. For this list box, I'd like to mimic the behaviour of the users control panel (since Windows Vista) -- that is: you single-click on a list item, and it's the same as double-clicking. In Win32, I'd do this by turning on the LVS_EX_ONECLICKACTIVATE style. In WPF, I've attempted to do this ...

Event for MouseOver action in WPF

I want to handle mouse over and mouse out events for a grid. Does WPF have events for this. Note: I dont want to use IsMouseOver property in my style. i have used MouseEnter and MouseLeave method but without much success. ...

OnRender Performance issues

(I'm sorry for my poor English.) My work is - drawing lines in Panel. For this, I overrided the OnRender method of Panel, and put a below code. /// <summary> /// 라인의 두께 /// </summary> private const double LINE_THICKNESS = 0.5d; /// <summary> /// 가로줄의 간격 /// </summary> private const double GAP_PER_WIDTH...

Extending C++ Win32 application with a C# WPF component

Hello, I need to add a new component to a C++ Win32 application (no CLR support) and I would like to implement the new component in C# and use WPF. This new component is basically a window with some controls, which I need to launch quickly from an option in the menu of the Win32 application. The new component and the existing applicatio...

WPF/Layered Architecture Question -

I'm thinking through the high level architecture of a WPF application. Usually I would think in terms of this A database server A data access layer on its own server A business logic layer on its own server WCF wrapper round the business layer UI Layer for use on the client. E.g. a thin client with all the magic happening on remote...

Wpf DataTemplate

I have Defined a DataTemplate for ListView to Display the fileInfo details. This is the DataTemplate <DataTemplate x:Key="srchFileListTemplate"> <StackPanel> <WrapPanel> <TextBlock FontWeight="Bold" FontFamily="Century Gothic" Text="FileName :"/> <TextBlock Margin="10,0,0,0" FontWeigh...

Pieces required for a usable MVVM Framework

Hi all, As my company migrates towards the .NET framework from VB6, it looks like we are going in the direction of WPF (my boss is in love with the Office-style Ribbon control). I've been working to mock one of our VB6 applications in WPF and decided to experiment with MVVM at the same time. I'm being discouraged from using an existin...

how to Set the position of Column in datagrid wpf

hello all i have a problem i m making a wpf application and using data grid Control to Show tabular data i m adding a Single Coloum in data Grid through Xaml And My All Other Column Would be add Dynamic my Fixed Column Comes At first postion in Grid i Want to be it to be come At last how can i achive it my Xaml code is As below Th...

Binding in Combobox in WPF

Hi Im a begginer in wpf. Actualy im styling a Combobox which receive data from a database. The combobox work fine at this point (without style). I have edited the Control template of the ComboboxItem control in stylesheet, lazing it like resource dictionary. If the style apply to combobox with static data, the style work fine, but if th...

How to set current CultureUI via XAML binding

I have a TextBlock bound to a string. I want the string to be displayed in current UI culture of the application. I want to do this in XAML. The text block is simple like below. <TextBlock Text="{Binding Path=Text}"/> ...

How do I send a NavigationCommand to a control?

Hi, FlowDocumentReader doesn't have a GoToPage method, but it supports NavigationCommands.GoToPage RoutedUICommand. How do I send NavigationCommands.GoToPage with parameter (for example: 1) to my FlowDocumentReader from within my code (not using xaml)? Thanks, Yariv Edited: Thanks! But though I can send the command with your help,...

WPF: How to reuse controls when ObservableCollection is concrete?

I have a object that inherits from TabItem. I have a bunch of Database objects that will reuse the same code so I wanted only one TabItem class and then use DataTemplates to control how each object gets presented. Problem is that the TabItem shows a collection of Objects and ObservableCollection is concrete. I've pondered a few solutio...

What should I use in Prism- MEF or Unity?

Found several good(related) questions here and here but all are nearly a year old. I will like to know in the current context of Prism development what is better or at least scenario where each is better. ...

how to create itemtemplatr column dynamic in wpf datagrid

hello all i want to add A itemtemplatecolumn(image) in Datagrid(Wpf) dynamic . how cain i do this plz help me out ...

How to write generic ListView ControlTemplates?

Generally speaking, ListViews are used like this: <ListView> <ListView.View> <GridView/> </ListView.View> </ListView> And pretty much every template i have encountered so far assumes that View property will be a GridView. The ListViewItem templates i have encountered always look something like this: <Border> ...

WPF Binding Issue with Textblock

I have 2 custom controls on my MainWindow.xaml. The first is an usercontrol that is a button/label combination (StyledButton) and the second is a custom textbox. I need to be able to set the text on a StyledButton so I created a TextCaption property. The binding on the TextCaption is causing the Text property of my custom textbox to b...

Run a WPF Application as a Windows Service

Hello We are developing a Windows Presentation Foundation Application that we would like to be able run as a Windows Service. Anyone done something like that? Is it possible? We don't need to interact with the Desktop or any GUI, it would just be nice to have one App that we can run with a GUI, from the Command Line (that works) or as...