InfoWindow(string title, string text, string image_url, string action_name, Action action) { InitializeComponent(); Loaded += Window_Loaded; Closing += Window_Closing; Closed += Window_Closed; PreviewMouseDown += delegate { try {//might be closed already Close(); } catch { } }; Topmost = true; Owner = invisible_owner_w; InfoControl ic = new InfoControl(title, text, image_url, action_name, action, true); ic.Name = "InfoControl"; grid.Children.Add(ic); //LayoutTransform = new ScaleTransform(0.1, 0.1); //UpdateLayout(); }
internal void SetAppearance(Brush box_brush, Brush button_brush) { //InfoControl ic = (InfoControl)FindName("InfoControl"); InfoControl ic = (InfoControl)grid.Children[0]; if (box_brush != null) { ic.box.Background = box_brush; } if (button_brush != null) { ic.button.Background = button_brush; } }