0
我試圖初始化在我的應用WrapGrid
,我設置其height
和width
和itemheight
和itemwidth
然後我說兒童把它作爲一個Border
控制 然後我Canvas
增加這WrapGrid
作爲一個孩子像正常的Windows 7應用程序一樣,但我得到xaml
錯誤問題在哪裏!!!!?WrapGrid錯誤
WrapGrid new_wrap = new WrapGrid();
new_wrap.Height = 75;
new_wrap.Width = 75;
new_wrap.ItemHeight = 16;
new_wrap.ItemWidth = 16;
Border imgborder = new Border();
imgborder.CornerRadius = new CornerRadius(5);
imgborder.Height = 16;
imgborder.Width = 16;
imgborder.BorderThickness = new Thickness(1, 1, 1, 1);
imgborder.BorderBrush = new SolidColorBrush(Colors.Black);
imgborder.Margin = new Thickness(10, 10, 0, 0);
new_wrap.Children.Add(imgborder);
new_shape_g.Children.Add(new_wrap);