Hi, I'm new to WPF, and I would like to know how to reuse some annoying xaml I have to avoid duplicating.
<Button Cursor="Hand" HorizontalAlignment="Left" Margin="0,0,0,0" x:Name="MyButton" Style="{StaticResource ButtonTemplate}" Width="286" Content="hi!" Focusable="False" IsTabStop="False"/>
<Button Cursor="Hand" HorizontalAlignment="L...
Hello,
i've a contentcontrol in my Wpf-App (MVVM) which is bound to an object and displays the objects properties in textboxes, so the user can edit the values of the properties.
I want to implement undo/redo functionality with the command pattern of the GoF.
For this i need a point where i can create the command and set it into my undo...
I am mucking about with WPF glyphs and documents and have run into a null reference exception in the .Net 4 framework.
I extract and save true-type fonts to disk as .ttf files, then try to create Glyphs based on the fonts. The first time I save a font to disk and instantiate a GlyphTypeface based on the font after creating a GlyphTypefa...
Hi all,
I want to tile my all open windows Horizontally/Vertically.
So that i can see them all together.
Please help me on this ...:-((
...
I'm new to WPF programming and decided to give it a shot by trying out the some ribbon control libraries.
The library that looks best for now is the Microsoft RibbonControlsLibrary. You can get it on the ribbon licensing page.
So far I've started a new project, added the control to the windows, but them I'm stuck: This is the code so fa...
I've to do a project with Microsoft Access 'we obliged to make with this tool'
I've implemented a user interface (bottoms and effects) using expression blend , and I build my database .The problem how can I make the relation between them.
as I read that MS can give us the new features in Access 2010, Microsoft can very well decide to go...
Hi,
I keep getting this error:
Microsoft.Practices.Composite.Modularity.ModuleInitializeException was unhandled
Message=An exception occurred while initializing module 'DiagrammerModule'.
- The exception message was: An exception has occurred while trying to add a view to region 'MainRegion'.
- The most likely causing except...
Regard this image:
The TimeTableViewModel of this user interface is this:
public string SchoolclassCodeMonday {get;set;}
public string SchoolclassCodeTuesday {get;set;}
public string SchoolclassCodeWednesday {get;set;}
public string SchoolclassCodeThursday {get;set;}
public string SchoolclassCodeFriday {get;set;}
public string Schoolc...
Hi Everyone,
I have two Data Template (one for drawing[draw] and another for Input Data[data]) Also I have the two ContentControls which uses the above DataTemplates.
I want the both DataTemplate's elements to be binded so that when the user fills in a field in the data form DateTemplate it automatically updates the draw Template as well...
I have a binding with data validation implemented by IDataErrorInfo. When data validation fails, the property is set. How could I avoid the change of the property when data validation fails?
Thank you very much.
...
I want to place a DataGrid inside a HeaderedContentControl but the the DataGrid does not get a vertical Scrollbar. It appears to be sized to hold all rows at once, the bottom disappearing from view.
If I place the same DataGrid in a Border elelemnt I do get the behaviour I want.
I have reduced it to this minimal example:
<Grid>
...
If someone were starting out with the .NET framework, what is the most feasible template to start with? And by the feasible I mean the one that has the lowest learning curve and the highest gains.
Start with:
Command Prompt applications
in C#?
Web applications using ASP.NET?
Silverlight applications in XAML/C#?
WPF/Winforms Desktop ap...
Whenever I insert the Aero.NormalColor.xaml into my resource dictionary, the only way the program is able to run is through debug mode. If it removed, I can run with debugging and without. Any reason? Here is my App.xaml:
<Application x:Class="HTA.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
...
hi,
I have a wpf datagrid that is bound to one dataset and has two combobox columns that take their values form the main dataset and has options from two different databases, in every other cell (which are regular textbox cells) once editing is finished the database is updated through an dataset.DataTable.RowChanged event, the problem is...
Hey guys
I have been trying to the LayoutStates state working in WPF when I realised that its a Silverlight only feature (gurrr).
Just wondering if anyone knows of an alternative to achieve the same result? If not can the same result be easily achieved manually? Specifically I'm trying to slide in new items when I add them to the list...
hi all,
im (like a lot of other people) doing my first steps in vs2010.
one of the things i just found which really annoys me is that each time i try to debug a WPF application the ide slows down so each movement from one statement to the other results in 10 sec. (!) waiting.
what can i do ? is there a nice solution (besides not using...
private void button1_Click(object sender, RoutedEventArgs e)
{
Process virtualMouse = new Process();
virtualMouse.StartInfo.FileName = "VirtualMouse.exe"; // Needs to be full path
virtualMouse.StartInfo.Arguments = ""; // If you have any arguments
bool result = virtualMouse.Start();
}
but iam getting error
...
Hi,
If I add a control to a canvas and than removes it, I can not re-add it to the same canvas (or to any other canvas for that matter) any idea how can I reset the parent?
mainCanvas.Children.Add(item);
mainCanvas.Children.Remove(item);
mainCanvas.Children.Add(item); // Will throw an exception that parent was already set.
Thanks,...
I want to add some text in a WPF RichTextBox at runtime in a new line.
I can do this using:
FlowDocument mcFlowDoc = new FlowDocument();
mcFlowDoc = richTextBox.Document;
Paragraph pr = new Paragraph();
pr.Inlines.Add(status);
mcFlowDoc.Blocks.Add(pr);
StatusText.Document = mcFlowDoc;
But there is too much of a gap between two lines. ...
I have two same events in different classes:
A.eventA
B.eventB
These two events: eventA and eventB are defined via the same delegate therefore the events have the same return value and parameters. Is it possible to fire A.eventA in the moment when B.eventB is fired?
I can write a method:
void return-value-of-delegate connect(param...