CanExecute Requery
I have a textbox on a wpf form that has 2 buttons next and previous when the textbox is in error next is disabled.cmdNextPage_CanExecute(object sender, CanExecuteRoutedEventArgs e) { if...
View Articlecalling a PointerRoutedEventArgs function
Hi,does anyone one how I can call the following functionprivatevoidPresOR(objectsender,PointerRoutedEventArgse) {} I am going to pass a string value for the Object sender, but what should...
View ArticleC# tree with parameter name and editable value field
Hi,I am new to C# and i have to make a tree of some parameters so i can change their values.The tree should look like this:Tree + (collapsible/expandable) | ParameterName1 ParameterValue1...
View ArticleDataGrid Sorting a cell destruction
Hi, I'm having a problem when sorting a grid because it appears that WPF rebuilds all the cells in the grid and consequently regenerates a particular RTF control which uses a MemoryStream which can...
View ArticleVisual Studio 2010 SP1 Bug !?
Hi!I think that there is a Bug in the SP1...Yesterday i install over the Windows UPDATER the last Version von Visual Studio...Now something is wrong...Berfore the Update is install is running this Code...
View ArticlePopup.IsOpen not working
Hi,I have a Popup declared in XAML. When I set IsOpen to true nothing happens. Can anyone think of what might cause a Popup to refuse to display itself even when you've just set IsOpen true?Thanks,Adam.
View ArticleHow to access the datagrid in code file?
I have xaml code as shown below, which is created using MS Blend. When i use in wpf application, it is unable to access thecurDataGrid( DATAGRID ) in the code file(.cs). Can anyone pls provide some...
View ArticleCamera Capture WPF 4.5
I was wondering how to capture an image using a webcam in WPF 4.5I tried following the example at http://www.codeproject.com/Articles/285964/WPF-Webcam-ControlBut i think it may be a little outdated...
View ArticleRestrict Scroll for FlowDocumentScrollviewer
Hi,i am using the following code<Grid Width="700" Height="700"> <ScrollViewe > <FlowDocumentPageViewer Height="1000" Width="2000"/>...
View ArticleCreating a login page using WPF and EF
I'm creating a login page to enable a user to use a WPF MVVM application. So far I'm using Entity Framework model, connected to a SQL database. I have one table that contains some user details such as...
View Articletabcontrol and listview content - selecting the currently selected tab's...
I've got a TabControl with several tabs and datatemplated listviews inside of them. I want to gain access to the listview (and scroll it to the top, I already know how to do that). The code I have...
View ArticleWhy does VM not get notified when Property in Model is changed?
Hi all,I am quite new to WPF, MVVM and all that stuff and I got stuck at validating my data.I have the following Model, ViewModel und xaml-Snippet, with Validation in the Model:public class Model {...
View ArticleWPF ComboBox Undo Exception on Ctrl+Z, Why?
Well, someone can tell me why this exception occurs in these conditions?Test Window:<Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"...
View ArticleWPF DataGrid Validation Problem
Hi, I have done DataGridRowValidaiton like this:<wpf:DataGrid.RowValidationRules> <wpfc4:CourseValidationRule ValidationStep="RawProposedValue"...
View ArticleWPF Treeview height
In my program i have a Treeview. If i click on a treeviewitem i want the properties of the textblock.I want to know the top, width of the textblock.Private Sub...
View ArticleHow to Bind Data to DataGrid at Run-Time
All, I have some test code that works with some test data defined as private ObservableCollection<TestClass> _testData = new ObservableCollection<TestClass>(); public...
View ArticleHaving problem with movable popup
I have a popup and I want to make it movable. I have almost got it, but it move in a funky way sometimes (the popup will move but the mouse pointer is not over the popup).XAML:<Popup...
View ArticleCreate Grid in numerous Listview Columns (xaml)
How do I create a grid in different columns in Listview? The below code puts the grid in the last column. How can I put it in the first column?Here's the result of the below...
View ArticleDP Coercion and Binding in Wpf
I have been playing with CoerceValueCallback today and I realized Coercion of a DP while Binding to that same DP doesn't like each other at all. So my question is can you guys give me an example or an...
View ArticleProblem with selection state in editable combobox
I have an editable combo box, with a fixed list of items. Let's say:foobarIf I select 'foo' from the drop down, the combobox text changes as expected. Now I edit the text and type in 'xxx'. Then I...
View Article