This question is locked. New answers and comments are not allowed.
this is my code
| private void RadTileView1_Loaded(object sender, RoutedEventArgs e) |
| { |
| for (int i = 0; i < 6; i++) |
| { |
| //外围框架 |
| RadTileViewItem ra = new RadTileViewItem(); |
| //标题元素 |
| TextBlock heahertext = new TextBlock(); |
| heahertext.Text = "正面吊"; |
| ra.Header = heahertext; |
| //内部动画元件 |
| RadFluidContentControl rfcc = new RadFluidContentControl(); |
| AnimationManager.SetIsAnimationEnabled(rfcc, true);//允许动画 |
| //定义动画 |
| Size s1 = new Size(Double.Parse("291"), Double.Parse("130")); |
| rfcc.SmallToNormalThreshold = s1; |
| Size s2 = new Size(Double.Parse("292"), Double.Parse("131")); |
| rfcc.NormalToSmallThreshold = s2; |
| Size s3 = new Size(Double.Parse("730"), Double.Parse("350")); |
| rfcc.NormalToLargeThreshold = s3; |
| Size s4 = new Size(Double.Parse("731"), Double.Parse("351")); |
| rfcc.NormalToLargeThreshold = s4; |
| //边框 |
| Border rfccborder = new Border(); |
| //边框尺寸 |
| rfccborder.Height = Double.Parse("193"); |
| rfccborder.Width = Double.Parse("30"); |
| // |
| //小图片 |
| TextBlock rfccsmallcontent = new TextBlock(); |
| rfccsmallcontent.Text = "详细参数"; |
| rfccborder.Tag = rfccsmallcontent; |
| // |
| //中等图片 |
| Image rfcccontent = new Image(); |
| rfcccontent.Source = new BitmapImage(new Uri("pic/1.jpg", UriKind.Relative)); |
| rfcccontent.HorizontalAlignment = HorizontalAlignment.Left; |
| rfcccontent.VerticalAlignment = VerticalAlignment.Top; |
| rfcccontent.Margin = new Thickness(13, 13, 0, 0); |
| rfcccontent.Height = Double.Parse("130"); |
| rfcccontent.Width = Double.Parse("279"); |
| // |
| //特写图 |
| Grid bigGrid = new Grid();//特写区域容器 |
| RowDefinition bigRowDF1 = new RowDefinition();//定义特写区域RowDefinition属性 |
| bigRowDF1.Height = GridLength.Auto; |
| //RowDefinition bigRowDF2 = new RowDefinition();//定义特写区域RowDefinition属性 |
| //bigRowDF2.Height = ; |
| bigGrid.RowDefinitions.Add(bigRowDF1); |
| Image rfcclargecontent = new Image();//特写图 |
| rfcclargecontent.Source = new BitmapImage(new Uri("pic/1.jpg", UriKind.Relative)); |
| rfcclargecontent.HorizontalAlignment = HorizontalAlignment.Left; |
| rfcclargecontent.VerticalAlignment = VerticalAlignment.Top; |
| rfcclargecontent.Margin = new Thickness(11, 11, 16, 0); |
| rfcclargecontent.Height = Double.Parse("156"); |
| rfcclargecontent.Width = Double.Parse("715"); |
| Grid.SetColumnSpan(rfcclargecontent, 3);//合并3行,并占据 |
| Border bigOutBorder = new Border();//特写图与文本外层间隔线 |
| Color bigOutBorderColor = new Color(); |
| bigOutBorderColor.R = (byte)Convert.ToInt32(string.Format("c9"), 16); |
| bigOutBorderColor.G = (byte)Convert.ToInt32(string.Format("cd"), 16); |
| bigOutBorderColor.B = (byte)Convert.ToInt32(string.Format("d2"), 16); |
| SolidColorBrush bigOutBorderBrush = new SolidColorBrush(bigOutBorderColor); |
| bigOutBorder.BorderBrush = bigOutBorderBrush; |
| bigOutBorder.Margin = new Thickness(10, 190, 10, 20); |
| bigOutBorder.VerticalAlignment = VerticalAlignment.Top; |
| bigOutBorder.BorderThickness = new Thickness(0, 1, 0, 0); |
| Grid.SetColumnSpan(bigOutBorder, 3); |
| Border bigInnerBorder = new Border();//特写图与文本内层间隔线 |
| Color bigInnerBorderColor = new Color(); |
| bigInnerBorderColor.R = (byte)Convert.ToInt32(string.Format("c9"), 16); |
| bigInnerBorderColor.G = (byte)Convert.ToInt32(string.Format("cd"), 16); |
| bigInnerBorderColor.B = (byte)Convert.ToInt32(string.Format("d2"), 16); |
| SolidColorBrush bigInnerBorderBrush = new SolidColorBrush(bigInnerBorderColor); |
| bigInnerBorder.BorderBrush = bigInnerBorderBrush; |
| bigInnerBorder.BorderThickness = new Thickness(0, 1, 0, 0); |
| bigGrid.Children.Add(rfcclargecontent); |
| bigGrid.Children.Add(bigOutBorder); |
| // |
| rfcc.SmallContent = rfccborder; |
| rfcc.Content = rfcccontent; |
| rfcc.LargeContent = bigGrid; |
| ra.Content = rfcc; |
| RadTileView1.Items.Add(ra); |
| } |
| } |
I cant find any problem,but the Real effect is unnormal, so what's wrong??