Skip to content

WPF

Silverlight, WPF and XAML programming discussions

This category can be followed from the open social web via the handle wpf@forum.codeproject.com

4.8k Topics 18.9k Posts
  • WPF Dependancy Property issue

    csharp wpf help question
    5
    0 Votes
    5 Posts
    12 Views
    R
    Cheers guys, that worked.
  • 0 Votes
    8 Posts
    22 Views
    J
    Sounds great chap ... look forward to hearing more. Jammer Going where everyone here has gone before! :) My Blog
  • WPF, Expression Blend and C++

    csharp c++ wpf hosting question
    3
    0 Votes
    3 Posts
    7 Views
    J
    Basically your going to have to make do with intermediate C# / VB / Blend projects. The example looks like it has to be a loose XAML file as well (no class definition using an x:Class="" declaration. In Blend you end up with a partial class code-behind which I'm almost sure would blow up in your scenario. <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Main="clr-namespace:WPFWindows" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="WPFWindows.Navigator3" Width="Auto" Height="Auto"> Jammer Going where everyone here has gone before! :) My Blog
  • 0 Votes
    16 Posts
    40 Views
    L
    This means we are having a good day then. :cool: The homework business normally translates to, "please check Google, then post question." Just glad we got you on the right track. Cheers, Karl » CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP Profile Just a grain of sand on the worlds beaches.
  • 0 Votes
    3 Posts
    8 Views
    J
    Hi Thomans, The working example I have here at the moment is using this code: public static void PlayAudioFile(string \_fileName) { DevicesCollection soundcards = new DevicesCollection(); Device dSound = new Device(); WindowInteropHelper wih = new WindowInteropHelper(Application.Current.MainWindow); dSound.SetCooperativeLevel(wih.Handle , CooperativeLevel.Priority); BufferDescription d = new BufferDescription(); Although that said I think I need to place all this audio in its own thread as there are currently some audio hiccups happening. Sometimes an audio file will play through fine other times it plays a short burst and then stops so this isn't fully functioning code yet. Jammer Going where everyone here has gone before! :) My Blog
  • Porting a WPF App to Mac ...

    csharp wpf data-structures question announcement
    16
    0 Votes
    16 Posts
    45 Views
    J
    I should say! There must be a lot of un-needed code to get GDI+ to do some of the WPF 'native' things. Jammer Going where everyone here has gone before! :) My Blog
  • Executing an animation from within code?

    database csharp wpf question
    2
    0 Votes
    2 Posts
    7 Views
    L
    Plenty of great examples on the web. I Googled: wpf execute animation in code Got lots of good examples. http://blogs.msdn.com/karstenj/archive/2007/06/20/collaborating-on-creating-animations-in-wpf-and-blend-possibilities-and-limitations.aspx[^] http://www.galasoft.ch/mydotnet/articles/article-2006102701.aspx[^] Cheers, Karl » CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP Profile Just a grain of sand on the worlds beaches.
  • Table like control to set width in percentages

    csharp css wpf data-structures tutorial
    3
    0 Votes
    3 Posts
    6 Views
    D
    I just read something about this, will see if it works, thx! /does exactly the same as a normal grid.. Example of what im doing: <grid> <expander content="{Staticresource somecontent}" /> <Expander content="{Staticresource somecontent2}" /> <Expander content="{Staticresource somecontent3}" /> <Expander content="{Staticresource somecontent4}"/> </grid> The resource content is something like this: ... Each expander resizes now to the amount of content (images) in them, which is different for each 1.. Found a solution: <Grid.ColumnDefinitions> <ColumnDefinition Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}, AncestorLevel=2}, Path=ColumnDefinitions[0].Width}" /> <ColumnDefinition Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}, AncestorLevel=2}, Path=ColumnDefinitions[1].Width}"/> <ColumnDefinition Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}, AncestorLevel=2}, Path=ColumnDefinitions[2].Width}"/> <ColumnDefinition Width="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}, AncestorLevel=2}, Path=ColumnDefinitions[3].Width}"/> </Grid.ColumnDefinitions> modified on Friday, April 11, 2008 3:48 AM
  • Performance Issue in WPF

    wpf help csharp hardware performance
    5
    0 Votes
    5 Posts
    11 Views
    J
    Since WFP is practically DirectX it might be worth investigating down this route ... Maybe experiment with you images as well. I can't imagine a scenario where I would want to degrade quality though so i've never looked into this. Jammer Going where everyone here has gone before! :) My Blog
  • DataGridView wpf style [modified]

    wpf csharp css algorithms tutorial
    5
    0 Votes
    5 Posts
    12 Views
    P
    Rob Philpott wrote: What would you do Pete if you had to display tabular data in WPF, buy a control or go about building one? It depends on what I was trying to do with it. If it wasn't too complicated then I'd look at extending the ListView - the beauty of templates is that you can turn something like the listview into a grid control without too much effort. Mind you, I do use Xceed WPF Grid as well - it's very nice (and free too in the basic version, always a plus point with me). Deja View - the feeling that you've seen this post before. My blog | My articles
  • All Hail WPF ...

    csharp wpf winforms question
    7
    0 Votes
    7 Posts
    22 Views
    J
    Mmmm ... toaties ... Jammer Going where everyone here has gone before! :) My Blog
  • Charting/Graphs in WPF

    csharp wpf question
    2
    0 Votes
    2 Posts
    6 Views
    J
    Yes ... I'm currently using Infragistics ... althought we have two new ones on the market now as well. ComponentOne have just released their WPF stuff and Xceed have their WPF stuff out too. ChartFX also have a WPF component but its still in beta and has been for what seems like years. I have only worked a lot with the Infragistics solution which works well. Good support too. Interestingly I have also spoken to Nevron a lot ... they seem to be almost shunning WPF in favour of actually writing a graphics engine of their own in order to then display that in a hosted fashion within WPF as they seem to think that WPF doesn't have the performance capability. I'm using the Infragistics datagrid with 60,000+ rows bound to it with no problems. Check them all out on these links ... http://www.infragistics.com/[^] http://www.softwarefx.co.uk[^] http://xceed.com/Grid_WPF_Intro.html[^] http://www.componentone.co.uk[^] http://www.nevron.com/Nevron.Home.aspx[^] Jammer Going where everyone here has gone before! :) My Blog
  • FPS camera

    csharp visual-studio help tutorial question
    2
    0 Votes
    2 Posts
    6 Views
    T
    I don't believe that is a WPF/WF/WCF question, that sounds more like Direct X. Unless WPF is hiding an excellent feature that I don't know about yet. :) Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios[^]
  • WPF - Separator Style

    csharp wpf question
    2
    0 Votes
    2 Posts
    8 Views
    L
    Take a look at the separator control template. I left the default control tempate in place without modifying it. You'll notice that although the Separartor has various public properties exposed, the template does not consume them. This is why your attempts to change it didn't work. So you can take this simple XAML and play around witht control template to get the look you desire. <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Window1" x:Name="Window" Title="Window1" Width="640" Height="480"> <Window.Resources> <Style x:Key="SeparatorStyle1" TargetType="{x:Type Separator}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Separator}"> <Grid Margin="0,6,0,4" SnapsToDevicePixels="true"> <Rectangle Margin="30,0,1,1" Height="1" Fill="#E0E0E0"/> <Rectangle Margin="30,1,1,0" Height="1" Fill="White"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </Window.Resources> <Grid x:Name="LayoutRoot"> <Menu HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" Height="Auto"> <MenuItem Header="File"> <MenuItem Header="New"/> <Separator Style="{StaticResource SeparatorStyle1}"/> <MenuItem Header="Exit"/> </MenuItem> </Menu> </Grid> </Window> Cheers, Karl » CodeProject 2008 MVP My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your Articles Just a grain of sand on the worlds beaches.
  • move item along the curve

    question
    2
    0 Votes
    2 Posts
    8 Views
    M
    Hi Zhendalf, Are you talking about drag and drop functionality? If yes, please take a look the following articles. Implementing Drag-and-Drop Functionality with Mouse Events and Capture (Silverlight 2)[^] How to: Drag and Drop Objects (Silverlight 2)[^] Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
  • DataGrid

    csharp wpf tutorial
    2
    0 Votes
    2 Posts
    8 Views
    P
    M.omar wrote: how to use a DataGrid in a WPF app Get a copy of Xceed WPF Grid. It's free (in the Express Edition) and really powerful. Deja View - the feeling that you've seen this post before. My blog | My articles
  • Problem scrolling WPF Controls

    wpf csharp hardware performance help
    2
    0 Votes
    2 Posts
    5 Views
    P
    devneeraj wrote: Is there some way in WPF by which we can use heavy styled xaml controls with good performance on PCs with UMA graphic card? Nope. You hit the same limitations as you would trying to run a 3D game running on the card. The limitation is not with WPF. If you have a problem, then you could offer multiple styled versions (it's as easy as swapping in another set or ResourceDictionary's) so that people with lower powered cards could choose to use a lighter version. Deja View - the feeling that you've seen this post before. My blog | My articles
  • 0 Votes
    9 Posts
    25 Views
    S
    Yes this is possible. I finally found the answer to this here... http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2196129&SiteID=1 Quote: "The problem is not with MaxReceivedMessageSize but with MaxBufferSize. MaxBufferSize seems to have a limit of 65536 in partial trust mode. To get around this you can leave MaxBufferSize at 65536 and change the transferMode to Streamed or StreamedResponse." After doing this you can set the MaxReceivedMessageSize to as big as you need.
  • xmlns and Solution folders

    help csharp dotnet wpf question
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • DesignerHost for WPF

    design csharp wpf question
    2
    0 Votes
    2 Posts
    6 Views
    P
    Well, you can always host your application inside the Visual Studio shell (see here[^]). I'm not sure that the Cider designer is available for developers as a standalone set of classes yet. It wasn't when 3.0 was released, and I haven't seen anything to indicate that this has changed. [Edit] OK - this section is a bit of information as to why there isn't a readily accessible equivalent to DesignerHost and DesignSurface for WPF. Basically, as you are aware, the DesignerHost and DesignSurface classes are part of the .NET framework, while the Cider designer is actually part of Visual Studio rather than the core framework. This means that Microsoft has all sorts of issues, such as licensing, that have to be sorted out. This is why the WPF designer in Visual Studio is a feasible route - basically, if I were you I'd look at using the Visual Studio shell in Isolated mode. I've done quite a bit of playing about with Visual Studio development and, once you get used to it, it's really powerful and really flexible. [/Edit] Deja View - the feeling that you've seen this post before. My blog | My articles modified on Wednesday, March 26, 2008 3:51 PM