I have the following code:
using Microsoft.Expression.Shapes;
Arc a = new Arc();
a.ArcThicknessUnit = Microsoft.Expression.Media.UnitType.Pixel;
a.ArcThickness = 10;
a.StrokeThickness = 1;
a.Fill = new SolidColorBrush(Colors.Aqua);
a.Stroke = new SolidColorBrush(Colors.DarkMagenta);
a.StartAngle = 0;
a.EndAngle = 360;
a.Width = 200;
a.Height = 200;
a.Stretch = Stretch.None;
_myStackPanel.Children.Add(a);
DispatcherTimer dt = new DispatcherTimer();
dt.Interval = TimeSpan.FromMilliseconds(1);
dt.Tick += (s, e) => { a.StartAngle = a.StartAngle + 4; };
dt.Start();
When it is executed I get an "erasable circle". I need to get the opposite effect. Сircle drawing effect. How can I change the code to get a "drawn circle"? Circle Drawning Example
Change the EndAngle instead of the StartAngle:
using Microsoft.Expression.Shapes;
Arc a = new Arc();
a.ArcThicknessUnit = Microsoft.Expression.Media.UnitType.Pixel;
a.ArcThickness = 10;
a.StrokeThickness = 1;
a.Fill = new SolidColorBrush(Colors.Aqua);
a.Stroke = new SolidColorBrush(Colors.DarkMagenta);
a.StartAngle = 0;
a.EndAngle = 0;//Start as 0
a.Width = 200;
a.Height = 200;
a.Stretch = Stretch.None;
_myStackPanel.Children.Add(a);
DispatcherTimer dt = new DispatcherTimer();
dt.Interval = TimeSpan.FromMilliseconds(1);
dt.Tick += (s, e) => { a.EndAngle = a.EndAngle + 4; };//update EndAngle
dt.Start();
Related
I'm trying to add panels to a form according to the ids quantity that is received. At running, the panels are added to the form, but only the first one has the controls, and I don't get why.
This is my actual code:
private void loadItems(List<int> ids)
{
int id = 0,
panelX = 10,
panelY = -30,
itemslblX = 15,
itemslblY = -65,
IDtxtX = 360,
IDtxtY = -40,
nametxtX = 130,
nametxtY = -40;
int height = (80 * ids.Count) + 50;
this.Size = new Size(600,height);
foreach(int c in ids)
{
panelY = panelY + 80;
itemslblY = itemslblY + 80;
terrainMenuY = terrainMenuY + 80;
IDtxtY = IDtxtY + 80;
nametxtY = nametxtY + 80;
Panel panel = new Panel();
panel.Location = new Point(panelX, panelY);
panel.Dock = DockStyle.None;
panel.Height = 75;
panel.Width = 575;
panel.BackColor = Color.Gray;
panel.Name = ids[id]+"Panel".ToString();
Label itemslbl = new Label();
itemslbl.Location = new Point(itemslblX, itemslblY);
itemslbl.Text = "Imagen Nombre ID";
itemslbl.Height = 20;
itemslbl.Width = 550;
itemslbl.Name = ids[id] + "itemsLabel".ToString();
TextBox IDtxt = new TextBox();
IDtxt.Location = new Point(IDtxtX, IDtxtY);
IDtxt.Height = 27;
IDtxt.Width = 200;
IDtxt.Text = ids[id].ToString();
IDtxt.ReadOnly = true;
IDtxt.Name = ids[id] + "IDtext".ToString();
TextBox nametxt = new TextBox();
nametxt.Location = new Point(nametxtX, nametxtY);
nametxt.Height = 27;
nametxt.Width = 200;
nametxt.ReadOnly = true;
nametxt.Name = ids[id] + "nameText".ToString();
panel.Controls.Add(itemslbl);
panel.Controls.Add(nametxt);
panel.Controls.Add(IDtxt);
this.Controls.Add(panel);
id++;
}
}
Any advice, please, and thanks for your time.
I'm trying to make an app(for college) which shows two rectangles which represent a clock. I have two rectangles, one which respresents seconds and the other minutes. The width must be adjusted every second to correspond to the time.
public partial class MainWindow : Window
{
Rectangle rectMinuut = new Rectangle();
Rectangle rectSeconde = new Rectangle();
public MainWindow()
{
InitializeComponent();
rectMinuut.Stroke = new SolidColorBrush(Colors.Black);
rectSeconde.Stroke = new SolidColorBrush(Colors.DarkBlue);
rectSeconde.Fill = new SolidColorBrush(Colors.DarkBlue);
rectMinuut.Fill = new SolidColorBrush(Colors.Black);
rectSeconde.Height = 100;
rectMinuut.Height = 100;
var date = DateTime.Now;
int widthMinute = date.Minute;
int widthSecond = date.Second;
rectMinuut.Width = widthMinute;
rectSeconde.Width = widthSecond;
Canvas.SetTop(rectMinuut, 50);
Canvas.SetTop(rectSeconde, 150);
paperCanvas.Children.Add(rectSeconde);
paperCanvas.Children.Add(rectMinuut);
Timer timer = new Timer();
timer.Interval = (1000);
timer.Elapsed += new ElapsedEventHandler(timer_Tick);
timer.Start();
}
private void timer_Tick(object sender, ElapsedEventArgs e)
{
//refresh here...
var date = DateTime.Now;
int widthMinute = date.Minute;
int widthSecond = date.Second;
rectMinuut.Width = widthMinute;
rectSeconde.Width = widthSecond;
}
}}
I tried different options, but my application always crashes when assigning a new value to rectMinuut.Width in the timer_Tick method.
Edit: Correct answer:
using System.Windows.Threading;
public partial class MainWindow : Window
{
private DispatcherTimer timer = new DispatcherTimer();
public MainWindow()
{
InitializeComponent();
timer.Interval = TimeSpan.FromMilliseconds(200); //200ms, because code takes time to execute too
timer.Tick += timer_Tick;
timer.Start();
}
private void timer_Tick(object sender, EventArgs e)
{
//refresh here...
Rectangle rectMinuut = new Rectangle();
Rectangle rectSeconde = new Rectangle();
rectMinuut.Stroke = new SolidColorBrush(Colors.Black);
rectSeconde.Stroke = new SolidColorBrush(Colors.DarkBlue);
rectSeconde.Fill = new SolidColorBrush(Colors.DarkBlue);
rectMinuut.Fill = new SolidColorBrush(Colors.Black);
rectSeconde.Height = 100;
rectMinuut.Height = 100;
var date = DateTime.Now;
int widthMinute = date.Minute * 2; //increase/scale width
int widthSecond = date.Second * 2;
rectMinuut.Width = widthMinute;
rectSeconde.Width = widthSecond;
Canvas.SetTop(rectMinuut, 50);
Canvas.SetTop(rectSeconde, 150);
paperCanvas.Children.Add(rectSeconde);
paperCanvas.Children.Add(rectMinuut);
}
}
}
I move three controls using this code on MouseMove Event :
if (inHareket)
{
GelenResimcik.Left = e.X + GelenResimcik.Left -MouseDownLocation.X;
GelenResimcik.Top = e.Y + GelenResimcik.Top - MouseDownLocation.Y;
GelenResimcik.BackColor = Color.Transparent;
ResimHareket.Left = e.X + ResimHareket.Left - MouseDownLocation.X;
ResimHareket.Top = e.Y + ResimHareket.Top - MouseDownLocation.Y;
Yonlendir.Left = e.X + Yonlendir.Left - MouseDownLocation.X;
Yonlendir.Top = e.Y + Yonlendir.Top - MouseDownLocation.Y;
Aktar.Left = e.X + Aktar.Left - MouseDownLocation.X;
Aktar.Top = e.Y + Aktar.Top - MouseDownLocation.Y;
Vazgec.Left = e.X + Vazgec.Left - MouseDownLocation.X;
Vazgec.Top = e.Y + Vazgec.Top - MouseDownLocation.Y;
}
and if I try move them faster the result is :
Notice : When i stop moving, the glow is not visible, it is only moving faster.
What shall I do?
EDIT :
My Controls
this.Yonlendir = new System.Windows.Forms.PictureBox();
this.Vazgec = new System.Windows.Forms.PictureBox();
this.Aktar = new System.Windows.Forms.PictureBox();
this.ResimHareket = new System.Windows.Forms.PictureBox();
this.GelenResimcik = new System.Windows.Forms.PictureBox();
My Init :
((System.ComponentModel.ISupportInitialize)(this.Yonlendir)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Vazgec)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Aktar)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ResimHareket)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.GelenResimcik)).BeginInit();
this.SuspendLayout();
//
// Yonlendir
//
this.Yonlendir.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.Yonlendir.Cursor = System.Windows.Forms.Cursors.Arrow;
this.Yonlendir.Image = global::Surface.Properties.Resources.rotate;
this.Yonlendir.Location = new System.Drawing.Point(26, 74);
this.Yonlendir.Name = "Yonlendir";
this.Yonlendir.Padding = new System.Windows.Forms.Padding(5);
this.Yonlendir.Size = new System.Drawing.Size(30, 30);
this.Yonlendir.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.Yonlendir.TabIndex = 14;
this.Yonlendir.TabStop = false;
this.Yonlendir.Click += new System.EventHandler(this.Yonlendir_Click);
//
// Vazgec
//
this.Vazgec.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.Vazgec.Cursor = System.Windows.Forms.Cursors.Arrow;
this.Vazgec.Image = global::Surface.Properties.Resources.iptal;
this.Vazgec.Location = new System.Drawing.Point(93, 8);
this.Vazgec.Name = "Vazgec";
this.Vazgec.Padding = new System.Windows.Forms.Padding(5);
this.Vazgec.Size = new System.Drawing.Size(30, 30);
this.Vazgec.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.Vazgec.TabIndex = 13;
this.Vazgec.TabStop = false;
this.Vazgec.Click += new System.EventHandler(this.buton1_Click);
//
// Aktar
//
this.Aktar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.Aktar.Cursor = System.Windows.Forms.Cursors.Arrow;
this.Aktar.Image = global::Surface.Properties.Resources.kaydet;
this.Aktar.Location = new System.Drawing.Point(57, 8);
this.Aktar.Name = "Aktar";
this.Aktar.Padding = new System.Windows.Forms.Padding(5);
this.Aktar.Size = new System.Drawing.Size(30, 30);
this.Aktar.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.Aktar.TabIndex = 12;
this.Aktar.TabStop = false;
this.Aktar.Click += new System.EventHandler(this.Onayla_Click);
//
// ResimHareket
//
this.ResimHareket.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.ResimHareket.Cursor = System.Windows.Forms.Cursors.Arrow;
this.ResimHareket.Image = global::Surface.Properties.Resources.hareket;
this.ResimHareket.Location = new System.Drawing.Point(26, 38);
this.ResimHareket.Name = "ResimHareket";
this.ResimHareket.Padding = new System.Windows.Forms.Padding(5);
this.ResimHareket.Size = new System.Drawing.Size(30, 30);
this.ResimHareket.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.ResimHareket.TabIndex = 11;
this.ResimHareket.TabStop = false;
this.ResimHareket.Click += new System.EventHandler(this.ResimHareket_Click);
this.ResimHareket.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ResmiHareket_MouseDown);
this.ResimHareket.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ResmiHareket_MouseMove);
this.ResimHareket.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ResimHareket_MouseUp);
//
// GelenResimcik
//
this.GelenResimcik.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.GelenResimcik.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.GelenResimcik.Location = new System.Drawing.Point(57, 39);
this.GelenResimcik.Name = "GelenResimcik";
this.GelenResimcik.Size = new System.Drawing.Size(438, 452);
this.GelenResimcik.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.GelenResimcik.TabIndex = 2;
this.GelenResimcik.TabStop = false;
My Timer (Interval 100):
private void ResimKontrol_Tick(object sender, EventArgs e)
{
try
{
if (ontanimli.Height != 0)
{
GelenResimcik.Image = ontanimliGelen;
GelenResimcik.Parent = cizim;
entegreGoster();
}
}
catch
{
}
}
entegreGoster and entegreGizle
public void entegreGoster() { GelenResimcik.BringToFront();ResimHareket.BringToFront();Aktar.BringToFront();Vazgec.BringToFront(); Yonlendir.BringToFront(); }
public void entegreGizle() { GelenResimcik.SendToBack(); ResimHareket.SendToBack(); Aktar.SendToBack(); Vazgec.SendToBack(); Yonlendir.SendToBack(); }
My MouseDown event :
private void ResmiHareket_MouseDown(object sender, MouseEventArgs e)
{
MouseDownLocation = e.Location;
inHareket = true;
}
I start timer when Open new form
Ontanimlilar ontanimli = new Ontanimlilar();
ontanimli.Show();
ResimKontrol.Start();
ontanimliGelen (public static pictureBox)
ontanimli Class :
Ciz.ontanimliGelen = seciliRes.Image;
this.Close();
I have a function that I need to call every once in a while. But, every time I do, the graph (a pie chart) resizes itself and becomes smaller than the previously obtained piechart.
void LoadPieChart(DateTime lower, DateTime higher)
{
splitContainer1.Panel1.Controls.Remove(pieChart);
pieChart.Series.Clear();
pieChart.Palette = ChartColorPalette.Fire;
pieChart.BackColor = Color.Black;
pieChart.Titles.Add("LOST OPPORTUNITY");
pieChart.ChartAreas[0].BackColor = Color.Transparent;
Series series1 = new Series
{
Name = "series1",
IsVisibleInLegend = true,
Color = System.Drawing.Color.White,
ChartType = SeriesChartType.Pie
};
pieChart.Series.Add(series1);
int num = A.CountLO();
List<string>[] lista = new List<string>[7];
lista = A.SelectLO();
float counter_manpower = 0;
float counter_spares = 0;
float counter_tools = 0;
float counter_other = 0;
string[] reason = lista[6].ToArray();
string[] low = lista[4].ToArray();
string[] up = lista[5].ToArray();
string[] collection = new string[366];
for (int j = num-LO; j < num; j++)
{
DateTime x = DateTime.Parse(low[j]);
DateTime y = DateTime.Parse(up[j]);
if (x.Date>=lower.Date && y.Date<=higher.Date)
{
if (reason[j].Equals("LACK OF MANPOWER"))
counter_manpower++;
if (reason[j].Equals("LACK OF SPARES"))
counter_spares++;
if (reason[j].Equals("LACK OF TOOLS"))
counter_tools++;
if (!reason[j].Equals("LACK OF MANPOWER") && !reason[j].Equals("LACK OF SPARES") && !reason[j].Equals("LACK OF TOOLS"))
{
counter_other++;
}
}
}
float a = ((counter_manpower/(counter_manpower+counter_spares+counter_tools+counter_other))*100);
float b = ((counter_spares / (counter_manpower + counter_spares + counter_tools+counter_other)) * 100);
float c = ((counter_tools / (counter_manpower + counter_spares + counter_tools+counter_other)) * 100);
float d = ((counter_other / (counter_manpower + counter_spares + counter_tools + counter_other)) * 100);
double aa = Math.Truncate(100 * a) / 100;
double bb = Math.Truncate(100 * b) / 100;
double cc = Math.Truncate(100 * c) / 100;
double dd = Math.Truncate(100 * d) / 100;
series1.Points.Add(counter_manpower);
var p1 = series1.Points[0];
Math.Round(a, 1);
Math.Round(b, 1);
Math.Round(c, 1);
if (counter_manpower!=0)
p1.AxisLabel = (aa.ToString() + "%");
p1.LegendText = "LACK OF MANPOWER";
p1.Color = Color.Red;
series1.Points.Add(counter_spares);
p1 = series1.Points[1];
if (counter_spares!=0)
p1.AxisLabel = (bb.ToString() + "%");
p1.LegendText = "LACK OF SPARES";
p1.Color = Color.Yellow;
series1.Points.Add(counter_tools);
p1 = series1.Points[2];
if(counter_tools!=0)
p1.AxisLabel = (cc.ToString() + "%");
p1.LegendText = "LACK OF TOOLS";
p1.Color = Color.Orange;
series1.Points.Add(counter_other);
p1 = series1.Points[3];
p1.AxisLabel = (dd.ToString() + "%");
p1.LegendText = "OTHER";
p1.Color = Color.Maroon;
//pieChart.Invalidate();
splitContainer1.Panel1.Controls.Add(pieChart);
}
I can't seem to find out why, any suggestions?
I use the following function to initalize the graph:
private void InitializeChart()
{
this.components = new System.ComponentModel.Container();
ChartArea chartArea1 = new ChartArea();
Legend legend1 = new Legend() { BackColor = Color.White, ForeColor = Color.Black, Title = "CAUSE" };
pieChart = new Chart();
((ISupportInitialize)(pieChart)).BeginInit();
SuspendLayout();
//===Pie chart
chartArea1.Name = "PieChartArea";
pieChart.ChartAreas.Add(chartArea1);
pieChart.Dock = System.Windows.Forms.DockStyle.Fill;
legend1.Name = "Legend1";
pieChart.Legends.Add(legend1);
pieChart.Location = new System.Drawing.Point(0, 50);
//====Bar Chart
AutoScaleDimensions = new System.Drawing.Size(284,262);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
//this.ClientSize = new System.Drawing.Size(284, 262);
this.Load += new EventHandler(Form1_Load);
((ISupportInitialize)(this.pieChart)).EndInit();
this.ResumeLayout(false);
}
I'm not sure where pieChart is defined... a private field?? If so, try creating a new PieChart after you have removed the previous one from the container:
splitContainer1.Panel1.Controls.Remove(pieChart);
pieChart = new PieChart();
pieChart.Series.Clear();
I'm guessing somewhere in your code you are accumulating a value instead of assigning it, so it is getting progressively smaller as you call the function on the same PieChart. Clearing out the pieChart should fix this problem.
I have the following code:
private void Package_ContactDown(object sender, ContactEventArgs e)
{
ScatterViewItem svi = new ScatterViewItem();
svi.Orientation = 0;
removeShadow(svi);
svi.IsActive = true;
PackageView view = new PackageView(sourceFile, this);
view.setScatterViewItem(svi);
svi.Width = 1024;
svi.Height = 768;
svi.Center = new Point(512, 384);
Viewbox box = new Viewbox();
box.Name = "box";
box.Child = view;
this.RegisterName(box.Name, box);
Viewbox boxSmall = new Viewbox();
boxSmall.Name = "boxSmall";
this.RegisterName(boxSmall.Name, boxSmall);
TextBlock txt = new TextBlock();
txt.Foreground = Brushes.White;
txt.Text = "Package of class";
boxSmall.Child = txt;
boxSmall.Opacity = 0;
boxSmall.IsHitTestVisible = false;
Rectangle border = new Rectangle();
border.Name = "border";
this.RegisterName(border.Name, border);
border.Fill = Brushes.Transparent;
border.Stroke = Brushes.White;
border.StrokeThickness = 2;
border.Opacity = 0;
Grid g = new Grid();
g.Background = this.FindResource("WindowBackground") as ImageBrush;
g.Children.Add(box);
g.Children.Add(boxSmall);
g.Children.Add(border);
svi.Content = g;
window.IconDisplay.Items.Add(svi);
DoubleAnimation animation = new DoubleAnimation();
animation.From = 0.0;
animation.To = 1.0;
animation.Duration = new Duration(TimeSpan.FromSeconds(3));
animation.AutoReverse = false;
Storyboard storyboard = new Storyboard();
storyboard.Children.Add(animation);
Storyboard.SetTargetName(animation, boxSmall.Name);
Storyboard.SetTargetProperty(animation, new PropertyPath(Viewbox.OpacityProperty));
DoubleAnimation animation2 = new DoubleAnimation();
animation2.From = 1.0;
animation2.To = 0.0;
animation2.Duration = new Duration(TimeSpan.FromSeconds(3));
animation2.AutoReverse = false;
Storyboard storyboard2 = new Storyboard();
storyboard2.Children.Add(animation2);
Storyboard.SetTargetName(animation2, box.Name);
Storyboard.SetTargetProperty(animation2, new PropertyPath(Viewbox.OpacityProperty));
DoubleAnimation animation3 = new DoubleAnimation();
animation3.From = 0.0;
animation3.To = 1.0;
animation3.Duration = new Duration(TimeSpan.FromSeconds(3));
animation3.AutoReverse = false;
Storyboard storyboard3 = new Storyboard();
storyboard3.Children.Add(animation3);
Storyboard.SetTargetName(animation3, border.Name);
Storyboard.SetTargetProperty(animation3, new PropertyPath(Rectangle.OpacityProperty));
svi.SizeChanged += delegate(object s, SizeChangedEventArgs args)
{
if (args.NewSize.Width < 150 && args.NewSize.Height < 150 && !isSmall)
{
svi.CanScale = false;
storyboard.Begin(this);
storyboard2.Begin(this);
storyboard3.Begin(this);
storyboard3.Completed += delegate(object sender2, EventArgs args2)
{
Console.WriteLine("Storyboard completed");
svi.CanScale = true;
};
isSmall = true;
}
if (args.NewSize.Width > 150 && args.NewSize.Height > 150 && isSmall)
{
isSmall = false;
}
};
}
And I noticed that the Storyboard#completed Event is never triggered. Why? And an additional question... Is there any way to reverse all these 3 animations? If I want to display the animations the other way round?
The completed event will not fire the first time around because it is not set before you call the begin method. Set the completed handler then call the begin and you should see the handler get called.
Is there a reason that you have three storyboards? Storyboards can contain multiple animations and you could just put all the animations into one storyboard. This would simplify reversing the storyboard.
DoubleAnimation animation = new DoubleAnimation();
animation.From = 0.0;
animation.To = 1.0;
animation.Duration = new Duration(TimeSpan.FromSeconds(3));
animation.AutoReverse = false;
DoubleAnimation animation2 = new DoubleAnimation();
animation2.From = 1.0;
animation2.To = 0.0;
animation2.Duration = new Duration(TimeSpan.FromSeconds(3));
animation2.AutoReverse = false;
DoubleAnimation animation3 = new DoubleAnimation();
animation3.From = 0.0;
animation3.To = 1.0;
animation3.Duration = new Duration(TimeSpan.FromSeconds(3));
animation3.AutoReverse = false;
Storyboard storyboard = new Storyboard();
storyboard.AutoReverse = true;
storyboard.Children.Add(animation);
Storyboard.SetTargetName(animation, boxSmall.Name);
Storyboard.SetTargetProperty(animation, new PropertyPath(Viewbox.OpacityProperty));
storyboard.Children.Add(animation2);
Storyboard.SetTargetName(animation2, box.Name);
Storyboard.SetTargetProperty(animation2, new PropertyPath(Viewbox.OpacityProperty));
storyboard.Children.Add(animation3);
Storyboard.SetTargetName(animation3, border.Name);
Storyboard.SetTargetProperty(animation3, new PropertyPath(Rectangle.OpacityProperty));
svi.SizeChanged += delegate(object s, SizeChangedEventArgs args)
{
if (args.NewSize.Width < 150 && args.NewSize.Height < 150 && !isSmall)
{
svi.CanScale = false;
storyboard.Completed += (o, s) =>
{
Console.WriteLine("Storyboard completed");
svi.CanScale = true;
};
storyboard.Begin(this);
isSmall = true;
}
if (args.NewSize.Width > 150 && args.NewSize.Height > 150 && isSmall)
{
isSmall = false;
}
};