Looking for guidelines to create application file. For example I have an application that store user input into a file (Textbox, DataGrid, ListBox etc). I'm looking for WPF-C# implementation.
I would like to have the following:
If user edit a any form(Textbox, etc) an asterisk is displayed to the window title.
When window is closed a...
Hi there
here is what I would like to do. I get a List of objects from a database and bind this list to a ListBox Control. The ListBoxItems consist of a textbox and a button. Here is what I came up with. Up to this point it works as intended.
The object has a number of Properties like ID, Name. If I click on the button in the ListBoxIte...
I have been putting off activity on SO because my current reputation is "1337". :)
This is a question of "why" and not "how". By default, it seems that WPF does not set focus to the first control in a window when it's opening. In addition, when a textbox gets focus, by default it does not have it's existing text selected. So basical...
I have ListBox in my application with Ten items, user can see five items at time.
Sometimes I'm selecting items from code and setting focus.
Selecting an item and focusing work perfectly when items are visible on Form, but for other non-visible items, I'm unable to set the focus (NOTE: after selecting it is visible to user).
Can anyone...
Is there a way to change the draw order of Controls in a StackPanel without changing the actual ordering of these controls in the StackPanel?
The reason I ask is that we have a button bar with margin 0 between the buttons. The active button grows (ie margin set to -10) overlapping the neighbouring buttons. The problem here is that the r...
how to get width of column in charting ColumnSeries. I have not DataPointStyle. It takes the default
I have set the itemssource to
col.ItemsSource =
new KeyValuePair[]{
new KeyValuePair(DateTime.Now.AddMonths(1), 100),
new KeyValuePair(DateTime.Now.AddMonths(2), 200),
new KeyValuePai...
Hi,
I'm working on a WPF application which must handle multiple screens (two at this this time).
One view can be opened on several screens and user actions must be reflected consistently on all screens.
To achieve this, for a given type of view, a single DataContext is instantiated. Then, when a view is displayed on a screen, the uniq...
Hi,
I have a collection (VariableValueCollection) of custom type VariableValueViewModel
objects binded with a ListView. WPF Follow:
<ListView ItemsSource="{Binding VariableValueCollection}" Name="itemList">
<ListView.Resources>
<DataTemplate DataType="{x:Type vm:VariableValueViewModel}">
<Grid>
<...
When I'm designing multiple views under the MVVM pattern, does each view get its own ViewModel or do they all share the same one? I understand that this is ultimately a flexible decision, but what is the best practice?
My gut tells me to have a ViewModel for each view (i.e. each separate UI window). All of the blog examples of MVVM sh...
I have written a custom dialog (form) that I can use in a C# program that behaves much like a "File - Open" menu command and brings up a window where a user can select a file or directory.
The question I have is this. It has "My Computer" as its root. How can I have it so that it searches on a Network? If the file or directory is loc...
Does that sound right to anyone????
I have an ItemsControl that displays data from a custom object that implements iNotifyPropertyChanged. The DataTemplate consists of:
Border
3 buttons
5 textboxes
An ellipse
A Bindable RichTextBox (custom class that inherits from RichTextBox... so I could make Document a dependency property (to suppo...
As I implement the MVVM pattern with WPF, I'm finding that Resharper is often warning me that certain properties are never used in my ViewModels. The problem is that they are being used, but only by the data binding system. Has anyone else encountered this annoyance and is there a way to help Resharper realize that these properties are...
Hello all I am trying to get the TextSearch.Textpath property to work within a WPF applcication but I am running into a wall on searching a bound field. Basically I have bound to some test data and I want to key the search off of the first property which contains a users ID. Here is the xaml I have so far:
<Window.Resources>
<DataTe...
Our solution is built using Release|x86; however, when our designers try to build using Blend they are forced to use Any CPU which we don't want to to add since it's going to change the behavior. I checked version 4, and it does not seem to address this issue.
Is there a way to specify Solution Configuration/Platform when using Blend? A...
We have a "legacy" WPF applicaton that is based on a NavigationWindow. The NavigationWindow has a fairly large ControlTemplate that houses a ContentPresenter as so:
<ControlTemplate>
....snip...
<ContentPresenter x:Name="PART_NavWinCP" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
.....snip....
</ControlTempla...
I am relatively new to WPF, so I understand about Styles and setters, but I am having trouble on this one.
I am using a WPF Data Grid and need to show multiple levels of grouping. I would like the 2nd and 3rd group levels to be more indented than the top level.
The following code will show group levels, but it shows them one right on t...
I have a user control that allows items to be added to it by exposing a Grid's Children property. Any control I add shows up fine but when I try to bind a property on the added item to a control in the main window nothing happens (example):
<TextBox Name="txtTest" Text="Success!" />
<mycontrols:CustomUserControl.ExposedGridChildren>
...
I would like to develop a small notifications application for Windows in .NET that docks on the right/left side of the screen (not consuming more than 300px), should always be visible and force the rest of windows to not overlap this application (something like the old Office taskbar or Vista's Sidebar). I have no idea where to start. Ca...
I'm using trying to implement MVVM in my app. I have a MainWindow.xaml and a MainWindowViewModel. I'm in the process of removing all of the code-behind code from the MainWindow.xaml but I'm stuck on one final piece.
In my pre-MVVM setup I started an animation in the MainWindow.xaml.cs that would fade out the form before closing it. ...
Any pointers on how would I create one of those (usually yellow) popup animated banners used in web apps (like stackoverflow FAQ)?
...