单元格显示
请问单元格设置成button后,怎样同时显示text和按钮如下图现在是这样如下图
你可以返回一个 stackPanel ,里面有text和button
var stackPanel = new StackPanel();
stackPanel.Orientation = Orientation.Horizontal;
var button = new Button()
{
Content = "Delete",
Margin = new Thickness(5, 5, 5, 5)
};
var text = new TextBlock();
text.Text = "abc";
stackPanel.Children.Add(text);
stackPanel.Children.Add(button);
dobj = new ControlDrawingObject(row, column, stackPanel);
吧_rootElement 的类型改成FrameworkElement
private FrameworkElement _rootElement; 好了,非常感谢!! 好了,非常感谢!! {:4_86:}
页:
[1]