can i add/subtract value that is bound to an element property?
does xaml allow modification of bound value? like: width="{Binding Elementname="lstMine", Path=Width}" -100 ? so that i can have a relative value. ...
does xaml allow modification of bound value? like: width="{Binding Elementname="lstMine", Path=Width}" -100 ? so that i can have a relative value. ...
Hello everybody, when i try to create unit tests using the unit test wizzard in visual studio 2008 the following error message is shown: "The following error was encountered while reading module 'PresentationFramework': Could not resolve member reference: System.Windows.Automation.Provider.IToggleProvider::get_ToggleState" I am able t...
Hi, I binded a database table's primary key to the selectedIndex of a combobox. the problem occurs where the primary key starts from 1 but selectedIndex accepts from 0. I mean, when I want to see the item with ID=1 in database, since it's listed as first element in combobox with index 0, it displays the second element in the list, which ...
Is there a reason why Visual Studio won't let me create a WPF window in a DLL project? I "solved" it by creating a window in an Application Project and copying it to my DLL project. I also found that I could just create a UserControl and change the base class to "Window". But if I had to do it this way, it's maybe because I shouldn't d...
Waht is the fatest (few lines of code and low resource usage) way to create an empty (0x0px or 1x1px and fully transparent) BitmapSource instance in c# that wehn used renders nothing. ...
this is how i implemented Shift-Tab or decrease indent... the result on screenr if ((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift && e.Key == Key.Tab) { // Shift+Tab int selStart = txtEditor.SelectionStart; int selLength = txtEditor.SelectionLength; string selText = txtEditor.SelectedText; string te...
I have read in many places that WPF combo does not support autocomplete but I used the IsEditable property and found that the autocomplete was working in WPF 4. Is this a new addition? ...
I have a Path and when user click on a segment I have to split it into two segments. I have the point where user click but I can't find a method to get the LineSegment that contains that point. I don't have to find the Path element... but the LineSegment of a collection of Segment that create the PathGeometry of the Path clicked. How ...
i currently use the onKeyDown event and an if else statement to create keyboard short cuts. if ((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift && e.Key == Key.Tab) { } else if (e.Key == Key.Tab) { } ... but if i have quite a few more keyboard short cuts, this gets messy. is there a better implementation? ...
I have heard that autocomplete does not work (out of box) in WPF combobox but when I type characters in teh WPF combo, it matches existing items of combo and automatically completes it. Isn't this autocomplete? Am I missing a point? ...
I am having two WPF (from the standard set) widgets A and B. When I change some property of A it should be set on B, when it is change in B it should be set on A. Now I have this ugly recursion --> I change A, so code changes B, but since B is changed, it changes A, so it changes B... You have the picture. How to avoid this recursion t...
I have a code snippet as below <CheckBox Name="cb" Margin="1,2,1,0" IsChecked="{Binding Path=IsManager}" IsEnabled="True"/> Consider I don't know which property is bind to IsChecked property. I want to get programattically know the binding information of IsChecked property. How can do I that? ...
Hey. I'm building my first app using MVVM and I stuck. Using the messenger to communicate other ViewModels about some changes was working ok until I tried to build an observablecollection of objects. I have a class (myClass) that contains a list (innerList). Elements of innerLists should send message to it's parent (to communicate that...
I have a DataGrid wich is bound to a DataTable.DefaultView. And now what i need additonaly: I did set the ColumnError Information of the DataGridRow. So for every row in my table i have column errors and i want to display this columns with red textcolour. So the user can see this column had an error. How can i set the cell color depen...
I have a ListView that gets updated frequently, at irregular intervals. I want it so that when an update is received the item will be scrolled into view. I know the code to do that: logListView.ScrollIntoView(logListView.Items[logListView.Items.Count - 1]); I don't know where to put it so that it happens when the ListView is updat...
Hi everyone, this is probably very simple, but I can't seem to figure it out... I'm currently using a UserControl to replace form fields to input text on a touch screen. This UserControl is essentially a Button displaying the current text and a pen icon, opening a separate screen keyboard window when pressed. It also needs to validat...
I have a TabControl on a UserControl backed by a ViewModel, and the Visibility of one of the tab items is bound to a property on the ViewModel. <TabControl x:Name="myTabControl"> <TabItem Header="Tab 1" /> <TabItem Header="Tab 2" Visibility="{Binding HasData, Converter={StaticResource boolToVisibilityConverter}}"/> </TabControl>...
I am brand new to both wpf and MVVM. I have a Mainwindow that has two views left side has a usercontrol with a listbox and the list box has a edit button inside of it. On the right I have another view that contains all my controls for viewing and editing the record. I can select an item in the list box and edit my record since using b...
Hello, I am binding a datagrid to some data and using the AutoColumnGeneration. When using a regular linq query against a dataset, everything works fine : var queryAll = from actor in actorsAll select new { ActorName = actor.IsPerson ? actor.FirstName + " " + actor.LastName : actor.CompanyName }; MalatDetailsBudgetGr...
I know that you can tie constant registers to dependency properties as well as tie a brush to a sampler, but every example I have seen of a wpf shader uses the declaration main( float2 uv : TEXCOORD ) : COLOR I am a complete newbie to HLSL but I know there are other semantics than TEXCOORD. Can any of them be used with a WPF shader? ...