|
Ok.
It seems that an update to sp1 was required.
Thanks.
|
|
|
|
|
Dear,
Anyone knows how i can create a clock timepicker in silverlight 2.0 (or 3.0)
thanks in advance
|
|
|
|
|
|
Hi,
I'm using a Grid with a TextBlock as a Y Axis Label so I need to rotate the text 90 (or 270) degrees, problem is that when you use a RotateTransform or PlaneProjection RotationZ="90" the text rotates but does not go beyond what the width of the label is so you get a chopped off piece of text running vertically, but only as high as the TextBlock is wide, am I doing something wrong?
Here's the XAML (using projection):
<Grid x:Name="LayoutRoot">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="23"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Test Vertical text" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
<TextBlock.Projection>
<PlaneProjection RotationZ="90"/>
</TextBlock.Projection>
</TextBlock>
</Grid>
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
|
Yep, tried it, as soon as you limit the width of the textbox the text gets truncated to that...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
A RotateTransform doesn't change the dimensions of your textbox.
Text truncation is a separate issue.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Not sure what you mean, could you maybe send me a snippet for this with a TextBlock of 90 Height and 23 Width (for example) with Vertical Text?
If tried using the RotateTransform and it still gives me the truncation, maybe I'm doing something else wrong...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
Adriaan Davel wrote: a snippet for this with a TextBlock of 90 Height and 23 Width
If that's the dimensions you're using then I can see why text gets clipped.
A RotateTransform applied to a textblock will rotate the textblock, not just the text.
So you don't want to swap the width and height values.
You'll also need to be mindful of the element the textblock is contained in,
which depending on its type, could cause additional layout on the textblock.
Here's an example:
<Border BorderBrush="SteelBlue" BorderThickness="2" Width="300" Height="200" >
<Grid Background="LightSteelBlue" >
<TextBlock Text="Rotated Text" FontSize="12" FontWeight="Bold" Width="90" Height="23" HorizontalAlignment="Center" VerticalAlignment="Center" >
<TextBlock.RenderTransform>
<RotateTransform Angle="270" CenterX="45" CenterY="11" />
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
</Border>
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark,
Thanks for the Snippet, if I use this the text displays vertically but I have whitespace on either sides of the text to the full width of the text, which means my entire Grid Column need to be the width of the text even though there is only a little bit of text in the middle of it, is there a way to avoid the white space? (Other than calculating negative borders...)
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
Maybe try the LayoutTransformer in the Silverlight Toolkit[^]
...
xmlns:layout="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
...
<Border BorderBrush="SteelBlue" BorderThickness="2" Width="300" Height="200" >
<Grid Background="LightSteelBlue" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="SteelBlue" BorderThickness="2" Background="AntiqueWhite" Margin="4" >
<layout:LayoutTransformer>
<layout:LayoutTransformer.LayoutTransform>
<RotateTransform Angle="270" />
</layout:LayoutTransformer.LayoutTransform>
<TextBlock Text="Rotated Text" FontSize="12" FontWeight="Bold" HorizontalAlignment="Center" />
</layout:LayoutTransformer>
</Border>
<Border Grid.Column="1" BorderBrush="SteelBlue" BorderThickness="2" Background="AntiqueWhite" Margin="4" >
</Border>
</Grid>
</Border>
Easier than trying to manually adjust margins/offsets.
Mark Salsbery
Microsoft MVP - Visual C++
modified on Thursday, October 1, 2009 1:07 PM
|
|
|
|
|
Mark Salsbery wrote: Steel
mmm, I like Steel!
Thanks Mark, I'll give it a try and let you know!
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
This is a brilliant solution, works 100%!
Thanks for the help!
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
I used the WPF ellipse in my program.
When I clicked on the ellipse, there will be blue dots appearing around it.
Why? How can I get rid of them?
|
|
|
|
|
The dot's are called a focus rectangle. To get rid of them you need to set the FocusVisualStyle to null for the particular button. You can do this like this:
<Button Content="..." FocusVisualStyle="{x:Null}" /> If you don't want the focus rectangle on any button, you'd define a global style for all buttons and set it there.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thanks a lot!
|
|
|
|
|
You're welcome.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
was going to suggest getting an ointment or something...
|
|
|
|
|
Hi Everyone,
I am developing a web site that will be commercial but i want a really nice look and feel it. What will be the best to use? Is WPF a good approach? If so where may I find good look and feel of existing web sites to show to my customer? How easy is it to maintain?
I also heard that search engines are capable of getting all keywords if you use Silverlight/WPF. How true is that and would you recommend WPF?
Thanks
Chris
|
|
|
|
|
Chris
WPF is primarily a desktop application framework. Yes, you can deploy BAML application, but they only run on Windows. The web development area that uses XAML (the markup behind WPF) is Silverlight. Yes, Silverlight is SEO "friendly", so that's probably what you are looking for.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
WPF mostly used to develop the desktop application.
i think you shoud use the ASP.NET+SQLServer+Ajax,if you want it to be more attractive,using the Silverlight~~
|
|
|
|
|
Hi,
i need a kind of impression. What tool enables me to create a WPF Form containing a lets say dark blue background. On top of this background there should be a circle shape consisting of 12 Segements. Each segment should be like aero glass but colored. Each segment should have a different color.
How can i create such ?
Any info is appreciated.
|
|
|
|
|
Sounds like you need a pie chart (available from the WPF Toolkit library here[^]).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi,
I am working on Silverlight project. In this I need to access a control in the tabcontrol in ManPage.xaml from another usercontrol which is placed on the MainPage dynamically. For accessing this we should not create object to the MainPage.xaml such that we no property or currentstate on the MainPage.xaml page control's state will not change.
If anyone have any idea to do this please reply me.
Thanks in advance.
|
|
|
|
|
Hey guys,
I am using a WPF control in a library to generate a graphic and save that graphic with RenderTargetBitmap to a png file.
To generate the control-object, I use the new-operator. After setting some properties (background, with, height), I call BeginInit().
Then I am setting some properties, which set properties of the control within the usercontrol (the control in the usercontrol is a Chart-control of the WPF Toolkit). After setting the properties of the usercontrol, I am calling EndInit().
Before I use RenderTargetBitmap, I am calling Measure and then Arrange. This seems to render my user control, but the chart control within the user control seems not to update.
How do I force updating the control within the user control?
Post every idea you have.
Tell me, if you need some source code or more details.
Thank you!!!!
|
|
|
|