Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
About my WPF app to draw a Bolt Hole Pattern.
Message
De
06/08/2008 01:25:29
 
 
À
03/08/2008 15:36:12
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Divers
Thread ID:
01334102
Message ID:
01336774
Vues:
15
Need your help... I'm trying to use your cdsSpinner control, and I can't get it yet.

I added your resources to my Window Resources, and I added your cdsSpinner code to my code-behind.

I tried to convert just one of my TextBoxes to this to test it:
<local:cdsSpinner x:Name="txtHoleCount1" Text="{Binding Path=HolePattern1.HoleCount, ElementName=winBoltCircle}"
PreviewGotKeyboardFocus="TextBox_PreviewGotKeyboardFocus" Height="25" Width="75" Style="{StaticResource cdsSpinnerStyle}"/>
But, I'm getting some "value cannot be null" error related to the I colors in these lines: I don't understand the error because I see those colors listed in the resource code you gave me.
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
                                <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
                                <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
(I have not added the event handler yet, but I just wanted to see it render at run-time for now). Also, you may get an error from my ObjectDataProvider resource, but it runs fine. It's a way to display the enum of the Hole.HoleType in the UI. It uses a complex syntax to drill into an enum in a class in a class that I think the designer cannot render, but it does run. It's really cool. I found the example on the web at some Josh Smith on WPF blog).

(Also, I am on SP1 Beta and 3.5 sp1 beta on this laptop, but I guess I expect the same error on my production machine at work which is NOT on SP1 Beta.)

For now, I just put everything you gave me in my one XAML file and my one code file. I'll post the entire code for both...

WHAT??? I just got an error from UT when trying to post my code that said is has obscenities in it, and I need to adjust it before posting.

I'll just have to throw it all in a file on my web site, and point you to that. I've never seen that before!!

I'll update this post with the link when I get to work. It's 12:30 am and I better go get in bed. gotta be up at 6:00!!


OK>>> HERE ARE THE LINKS TO THE CODE FILES (you may have to do "right-click" and "save target as")

http://jordanmachine.com/Window1.xaml

http://jordanmachine.com/Window1.xaml.cs
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform