-
January 6th, 2012, 12:30 AM
#1
Junior Member
How do you set a default size of a control that you can resize?
How do you set a default size of a control that you can resize?
I have been looking at a code sample from Charles Petzold.
It is from here:
http://www.charlespetzold.com/blog/2009/05/Realizing-a-Fisheye-Effect-in-Silverlight.html
it uses mouse over methods to increase the size of button classes.
I have it working but I want to make some modifications. I want the starting size of the button to be larger. I do not know how much of the code I need to post here to make the issue clear enough. The XAML for the page describes a "FisheyeButton" that is described in a seperate xaml file. Something like this:
Code:
<StackPanel x:Name="LayoutRoot" Width="1017" Orientation="Horizontal" Height="253">
<src:FisheyeButton Style="{StaticResource btnStyle}" ButtonContent="Button No. 1" />
</StackPanel>
The functionality of the project is such that if I give the Fisheyebutton a width and height a set size at this loction, the effect where the size of the control the effect of becoming larger does not happen. In other words, if I write in the <src:FisheyeButton... tag above Width="100", then the button does not behave at run time as it should.
In the same page.xaml file, the btnStyle is defined like this:
Code:
<UserControl.Resources >
<Style x:Key="btnStyle" TargetType="src:FisheyeButton">
<Setter Property="VerticalAlignment" Value ="Center" />
<Setter Property="HorizontalAlignment" Value ="Center" />
<Setter Property="FontSize" Value ="12" />
</Style >
</UserControl.Resources >
I wonder if perhaps at this point, I can add a "Setter" property to define a default starting widh and height for the class.
Similar Threads
-
By Nokia in forum The Security Tutorials Forum
Replies: 0
Last Post: October 23rd, 2006, 04:58 PM
-
By zencoder in forum Microsoft Security Discussions
Replies: 10
Last Post: February 17th, 2006, 02:21 PM
-
By MrLinus in forum The Security Tutorials Forum
Replies: 4
Last Post: October 11th, 2003, 03:22 AM
-
By ntsa in forum The Security Tutorials Forum
Replies: 5
Last Post: November 13th, 2002, 10:32 PM
-
By ahmedmamuda in forum AntiVirus Discussions
Replies: 2
Last Post: March 20th, 2002, 02:03 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|