Hello,
I will use this constructor Matrix(RectangleF rect, PointF[] plgpts) in System.Drawing.Drawing2D (which take a rectangle in parameter) in a wpf app but I don't find the equivalent in System.Windows.Media.Matrix.
I'm not masterize matrix and this constructor is very easy to use. Is there an other solution ?
Many thanks
...
Using the System.Drawings System.Drawing.FontFamily.Families brings me up more families than the ones supported for WPF, or at least there is something wierd with some of the fonts that doesn't get rendered.
Is there another way to get a Collection of all Fonts current available?
...
When you use the FontFamily property of the RichTextBox it changes the FontFamily of the whole content inside the FlowDocument.
The same way you can Execute a command like EditingCommands.ToggleBold, where it only changes the word under the caret or just the new text to be written, there should be a way to do the same thing with the Fon...
I am trying to alias a resource in XAML, as follows:
<UserControl.Resources>
<StaticResourceExtension x:Key="newName" ResourceKey="oldName"/>
</UserControl.Resources>
oldName simply refers to a resource of type Image, defined in App.xaml.
As far as I understand, this is the correct way to do this, and should work fine. However,...
I have a very simple case that I think would benefit from using templates (but I'm not sure, which is why I'm asking). All the templating examples I've seen either assume more knowledge than I have, are too specific to be of much use to a total newb like myself, or contain lots of ancillary stuff that makes it hard to identify what's pa...
In my XAML Code I have bound the Height property of an control to the ActualHeight for it's parent control. Because I have to calculate an offset from the original value I use and IValueConverter.
Height="{Binding ElementName=MainCanvas, Path=ActualHeight, Converter={StaticResource adjustVerteilung} , ConverterParameter= 12}"
This wor...
I am trying to animate the Fill property of a path. What I have so far is a ColorAnimation that works well. The target property is (Shape.Fill).(SolidColorBrush.Color) and I set it to a value of "#999999" (just an example color).
The problem comes from the fact that I'd like to set the value to "{TemplateBinding Background}". Since ...
Can anyone explain the difference between this way of loading modules in Prism:
protected override void InitializeModules()
{
IModule customerModule = Container.Resolve<CustomerModule.CustomerModule>();
IModule helloWorldModule = Container.Resolve<HelloWorldModule.HelloWorldModule>();
customerModule.Initialize();
helloW...
I have a usercontrol (ItemsView) that I use in one of my other view. Since I need to access its ViewModel, the ItemsViewViewModel is contained by the ViewModel of the view that contained the control. I use this control at many times and I find it useful to bind a collection on the ItemsSource of my ItemsView control (differently, dependi...
hi All,
when I bind a property in the child viewmodel to a textbox, the source won't get updated no matter what mode i set on the binding.
the xaml code is like this:
<TextBox Text="{Binding Path=OrderDetail.CashPaid, Mode=TwoWay}"/>
when the view loaded, the binding system query the CashPaid property once. but whenever the text is...
I want to open the help file to a page based on some custom logic. How can I handle the user pressing F1 on all of my windows (main window and modal dialogs) ?
I know how to handle F1 in a single window, but can this be done globally, so I don't have to add the same code to all of my windows ?
Below is the test with which I've tried ou...
What I need to accomplish is a ComboBox that shows People. When you expand the drop-down it shows FirstName and LastName, but when you select a person, the value shown at the combobox should be just the person's first name.
I have the following ItemTemplate:
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Ho...
Yesterday while looking for a totally unrelated topic I came across the "PropertyPath XAML Syntax" MSDN page (http://msdn.microsoft.com/en-us/library/ms742451.aspx) and saw the "Single Property, out of XAML Loading Namescope, Run-Time Reflection" header (near to the middle of the page). Even though I have been programming WPF for years n...
Or would I have to do something like create a windows form and host the xaml inside it? Trying to get as consistent a look and feel as I can. If I can only do the latter, how do I achieve that?
...
I made a UserControl that is meant to be updated once every few seconds with data from a serial port. This UserControl should be very simple, consisting of a Label for a field name, and another Label containing the field value. I say that it should be simple, but it doesn't work. It does not update at all, and doesn't even display the...
Hello, I have this problem. I need to know the size a Label is trying to use, but since the control that contains it is smaller than the actual label, when I call label.ActualWidth, what I really get is the width of said container control. Is there a way to get the width that the label would require to fit its content (disregarding its A...
Hello,
I will explain my question a little more.
I have a ObservableCollection binded to a ItemsControl with it datatemplate. Nothing new :P.
The thing is that I'm using a Drag & Drop library for changing the order of the items in the ItemsControl. The library works fine, you can drag some items in the ItemsControl.
The problem is th...
I have a usercontrol that acts as a container for a ContentControl.
The user control container has a listview control that I want to use to update controls in a dynamically added user control assigned to the ContentControl.
IOW, as I scroll through the listview control, the textbox's in the UC assigned to the ContentControl should update...
How can I determine the size of an ImageSource in pixels? The ImageSource object has a Height and a Width property, but they return the size in 1/96 inches..
...
Hi there,
I have successfully created a asp mvc app which basically has interface, service and dataacces - AKA the repository pattern..
What would be the best way to call my service (my repository pattern) from an MVVM structured WPF app..
From what i see.. in the MODEL in wpf i presume i call my service (repository pattern) from the ...