wpf

Repeating the image in horizontal position ( C# Drawing )

am using c# am having a bitmap image like below i want create a repeated image like below in horizontal position to get repeted continous image for some given width. i meant i like to draw repeated image like below from the above single bitmap (In simple words,in html we can have a image and set repeat X to get the repeated image.li...

No-touch deployment and information about update

Greetings, We have an application written in .net 3.5 that uses wcf and also wpf for the purpose of presentation. We have No-touch deployment implemented so users just click on internet shortcut and application starts immediately. Sometimes, when we update application, it takes about 30minutes to update client applications, server and ...

WPF Combobox SelectedItem hell

Im having a very funny issue in WPF Im creating a Combobox through code, and adding it to a control. When I set the Combobox.SelectedItem or Combobox.SelectedIndex or Combobox.SelectedValue I am unable to select another option from the Combox items. ForeignKeyDisplayAttribute attribute = (ForeignKeyDisplayAttribute)this.GetAttribute(t...

Calling or sending values from MainViewModel to other ViewModels mvvm mvvm light

Hi, We are using mvvm light framework to build our application. In our ViewModel folder, we have number of Viewmodel like orderSupplyViewModel,HouseholdSupplyViewModel etc files as per the different functionality of the application. We have included all these viewModels in the MainViewModel by making the MainViewModel as partial class. ...

MVVM WPF design related query : use of UserControls

I have one query related to designing WPF using MVVM Here is the scenario : 1> I have one WPF screen which contains various user controls which are reusable in some other screens too. 2> Can i have separate ViewModel class for each of those user controls , what could be ideal design in this scenario 3> Should i separate my Viewmodel...

How can try python working in WPF?

Try Python is An interactive Python tutorial running in the browser. http://www.trypython.org/ But, I want to run it in my Winform or WPF application. How can I do that? I konw WPF support WebBrowser, could I use try python by it? I want to add a iteractive window in my application, not only run ironpython in it. ...

Updating an ObservableCollection in WPF causes screen flicker; How can I prevent it?

I have an ObservableCollection bound to a WPFToolkit DataGrid in an MVVM pattern. Every 30 seconds I have a background thread that is querying a service for some data. When it returns, it marshals it to the UI thread and updates the ObservableCollection by first calling Clear() on the collection and then calling Add() for each item. When...

DataGrid row values position changing on mouse click

Hi, I have a very strange issue with wpf datagrid row mouse click.when ever i click on a row that row's data moving to top of the row. But when it loads first time all rows data is center aligned. Am i missing any property on datagrid. Please do the needful . Thanks In Advance. regards KSR ...

Int32Animation SetCurrentValue in .NET 3.5

Hello, In Dot Net Framework 4.0, SetCurrentValue api is introduced in Int32Animation class. But it is not exist in .Net 3.5. Anybody help me how i will achieve the SetCurrentValue in 3.5 Framework? BR ...

WPF: KeyBinding for Tab, Swallows Tab and Doesn't Pass It Along

I've got a textbox where I have this: <KeyBinding Command="{Binding MyCommand}" Key="Tab"/> Problem is it swallows the Tab and doesn't tab to the next control. How can I trap the Tab for the textbox and still preserve tabbing to the next control in the tab order? Edit: I'm also using MVVM and MyCommand is in the ViewModel code, so that...

Understanding Routing Events: Why I need both, bubble and tunnel events?

Hi all, I read this good article about Routed Events, and I understood why we need sometimes bubble Events and sometime we need tunnel Events. What I didn't understand is, when we use the tunnel Event, why after it is handled or reached to the source element, still the bubble event is launched? Thanks in advance! ...

How to 'get at' the WPF combobox PART_EditableTextbox because combobox not getting highlighted?

Hi, My WPF combobox is populated with a different set of strings each click of a button. There are other controls on the window as well. The combobox is the 'first' (top) in the window, but the text doesn't get highlighted. When the user tabs through the controls, the text DOES get highlighted, but when it's the first on the window, it ...

DRYing out C# for WPF windows with the same fields

I have two windows in my WPF app: a login window and an options window. Both have the same form with a user name and password field, as well as some other fields for providing credentials. I want some code that knows there will be a txt_userName TextBox available, for example, and can do things based on that. I was thinking I could m...

Neptune2 [just came from Mars]

well , seriously guys i got sick of WPF errors and hard handling , look i got many buttons are dsigned to represent rooms and i want to bind into a tooltip to get occupier name and informations from database . i cant find how to do it. Thanks ...

WPF & MVVM: Save ScrollViewer Postion And Set When Reloading

I've got a ScrollViewer for a StackPannel. The users want the save the position of the ScrollViewer so when the application is re-loaded with their data the StackPannel will show the items they were viewing before. It has nothing to do with which items were selected, if any, merely the potion of the ScrollViewer in relation to the StackP...

WPF - Changing Column Name on Data Bound DataGrid

Hey all Basically I'm using the ItemSource property of the datagrid to bind a generic list to my datagrid. However I'd really like to change the headings, I tried the following but I get a runtime exception: dgtest.Columns[1].Header = "edited"; ...

WPF FontFamily Format question

Hi, I'm trying to set the selected value of my Font Family combobox, which has been populated with the following XAML: <ComboBox ItemsSource="{x:Static Fonts.SystemFontFamilies}" Name="cboFont"> <ComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel MinWidth="256" /> </ItemsPanelTemplate> ...

WPF - Bind to Item Index from within ItemTemplate of ItemsControl?

Is there a way to bind to the ItemIndex from within the ItemTemplate of an ItemsControl? For example: <ItemsControl ItemsSource="{Binding Path=ItemList}"> <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Path=ThisItemsIndex}" /> </DataTemplate> </ItemsControl.ItemTemplate> </Items...

WPF WindowStartupLocation="CenterOwner" not really center, and pops all over, why?

Well this question and this question are similar but no answers that work. In fact I was hoping WindowStartupLocation=CenterOwner would work...it doesn't. It seems to center the new window in the center of a grid column, not the center of the main window. So I'm assuming it thinks that is the parent. Second when I close the dialog and ...

How do I disable VisualBrush animation ?

I am drawing framework elements to a drawingcontext using a visual brush. I want to disable all animation when I am doing this. My tests below do not work. When the code is called, a checkbox is draw and the check mark animates in. My code using animation looks like this: DrawingContext drawingContext; //from parameter var checkbo...