I'm reading a lot about good and bad practices in OOP design. It's nice to know your design is bad, or good. But how do you get from bad to good design?
I've split the interface (xaml) and codebehind from the main businesslogic class. That last class is growing big. I've tried splitting it up into smaller classes, but I'm stuck now. Any...
Hi.
I can't find newer Microsoft Blend Preview. Is it available?
Thank you for your answers.
...
Is it possible to bind an additional resource string to another attribute within a control. I already have one attribute bound to a resource but also need another. I can't see a way of doing it as I would need an extra DataContext but oviously can only have one.
The additional attribute I need to bind to is Content within the hyperlink ...
I have an image and i want to set its hex data as the data for the Path object in a button in XAML.
Is there a tool that will get me the Hex data for this purpose?
...
As I am a programmer,and not an artist or animator and I am failing at showing off the best features of WPF in my application. Although I have samples for simple animations for buttons like growing, or having the color fade into something brighter on click but what I am looking for is some showcase button animations and some showcase pa...
I am binding an Image.Source property to the result of the property shown below.
public BitmapSource MyImageSource
{
get
{
BitmapSource source = null;
PngBitmapDecoder decoder;
using (var stream = new FileStream(@"C:\Temp\logo.png", FileMode.Open, FileAccess.Read, FileShare.Read))
{
decoder = new PngBitmapDecod...
Is there any way to broadcast a RoutedEvent to all of my children in WPF?
For example lets say I have a Window that has 4 children. 2 of them know about the RoutedEvent 'DisplayYourself' and are listening for it. How can I raise this event from the window and have it sent to all children?
I looked at RoutingStrategy and Bubble is the ...
In the WPF app we are building, we have 3 groups of RadioButtons in individual StackPanels side by side. We are trying to program the following behavior. When tabbing through the form, we don't want to tab through each of the radiobuttons (standard behavior), instead we would like to tab to the "first" radiobutton in each group and have ...
Hello!
In WPF, I have tried passing the markup of an XPS file's FixedPage to a control that has the Content property (ex. Button.Content = XamlReader.Load()).
Example of FixedPage markup:
<FixedPage Width="816" Height="1056" xmlns="http://schemas.microsoft.com/xps/2005/06" xml:lang="und">
<Path Data="M 115.52,132.48 L 704.64,132....
I have a fairly simple UserControl that I have made (pardon my Xaml I am just learning WPF) and I want to slide the off the screen. To do so I am animating a translate transform (I also tried making the Panel the child of a canvas and animating the X position with the same results), but the panel moves very jerkily, even on a fairly fas...
I have a object in a presenter connected to a view. Inside my XAMTL I have the following:
<Label Content="{Binding ElementName=PSV, Path=Presenter.Portfolio.Name}"/>
Now when the control is created, Portfolio is null, then i run another method which sets Portfolio. I've implemented INotifyPropertyChanged but so far, I've not been able...
In Visual Studio.NET when coding I constantly use (no selection) CTRL-C, CTRL-V to make a quick copy of a line.
Unfortunately this works differently in the XAML editor (it pastes the new line in the middle of the current line).
Does anyone know the hotkey to copy a line in XAML?
...
I have a Silverlight 2.0 project that allows a user to add text and images to a canvas. They can move, rotate and resize the text/images. I was wondering the best way to serialize the Silverlight objects to a database and also be able to generate a PDF of the canvas to be printed.
I've read some articles about calling a web-service ...
I have a WPF RichTextBox that is dynamically built in a WPF web service. This web service accepts a xaml string that is extracted from the contents of a third-party silverlight RichTextBox control.
<Paragraph TextAlignment=\"Left\"><Run FontFamily=\"Comic Sans MS\" FontSize=\"16\" Foreground=\"#FF0000FF\" FontWeight=\"Bold\" >This text...
In Charles Petzold's "Using Templates to Customize WPF Controls" article in the Jan 2007 edition of MSDN Magazine (http://msdn.microsoft.com/en-us/magazine/cc163497.aspx), he says,
The ProgressBar control actually has two default templates for the two orientations. (This is true of ScrollBar and Slider, as well.) If you want your new...
I have a Window with my user control and I would like to make usercontrol width equals window width. How to do that?
The user control is a horizontal menu and contains a grid with three columns:
<ColumnDefinition Name="LeftSideMenu" Width="433"/>
<ColumnDefinition Name="Middle" Width="*"/>
<ColumnDefinition Name="RightSideMenu" Width="...
Basically I would like to be able to do something like this in my xaml:
<Image Source="Resources/logout.png" />
and have it find Resources/logout.png as a file in my xap file, without going back to the web server. I also want to be able to rebuild my xap file on the fly, so placing it as a resource in a dll is not acceptable.
Any id...
Is there a tool to take a GUI designed in C# or other languages that can take the screen layout and export that to an XML file
such that you end up with a template of the screen in xml terms? As well as take an xml file and display the resulting screen?
...
Are there any libraries which
Allow to draw svg direct to a Windows Forms application
to a WPF application
I draw graphics and design everything with Inkscape, because I love that program.
Then I have those stunning svgs and have to either export them to png (WinForm) to use them or convert them to xaml-code (WPF) (Kaxaml helps me).
...
When data binding two elements together, how can I include the binding information AND text as in the case below where I want my label to say:
The font size is 8.5
<Grid>
<StackPanel>
<Slider Name="theSlider" Margin="5" Minimum="8" Maximum="14"></Slider>
<Label Content="The font size is: {Binding ElementName=theSlid...