Esempio n. 1
0
 private void CreateWindow_Click(object sender, RoutedEventArgs e)
 {
     _wnd         = new C1Window();
     _wnd.Header  = "This is the header.";
     _wnd.Height  = 300;
     _wnd.Width   = 300;
     _wnd.Content = new WindowContent();
     _wnd.CenterOnScreen();
     _wnd.Show();
 }
        private void btnExportStyle_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                string style = string.Format(@"<Style x:Key=""MyGridStyle"" TargetType=""c1dg:C1DataGrid"">
    <Setter Property=""Background"" Value=""{0}""/>
    <Setter Property=""BorderBrush"" Value=""{1}""/>
    <Setter Property=""HorizontalGridLinesBrush"" Value=""{2}""/>
    <Setter Property=""MouseOverBrush"" Value=""{3}""/>
    <Setter Property=""PressedBrush"" Value=""{11}""/>
    <Setter Property=""RowBackground"" Value=""{4}""/>
    <Setter Property=""AlternatingRowBackground"" Value=""{5}""/>
    <Setter Property=""SelectedBackground"" Value=""{6}""/>
    <Setter Property=""VerticalGridLinesBrush"" Value=""{7}""/>
    <Setter Property=""Foreground"" Value=""{8}""/>
    <Setter Property=""RowForeground"" Value=""{9}""/>
    <Setter Property=""AlternatingRowForeground"" Value=""{10}""/>
    <Setter Property=""ValidationBackground"" Value=""{12}""/>
    <Setter Property=""ValidationForeground"" Value=""{13}""/>
    <Setter Property=""HeaderBackground"" Value=""{14}""/>
    <Setter Property=""HeaderForeground"" Value=""{15}""/>
    <Setter Property=""GroupingPanelBackground"" Value=""{16}""/>
    <Setter Property=""GroupingPanelForeground"" Value=""{17}""/>
</Style>",
                                             (grid.Background as SolidColorBrush).Color,
                                             (grid.BorderBrush as SolidColorBrush).Color,
                                             (grid.HorizontalGridLinesBrush as SolidColorBrush).Color,
                                             (grid.MouseOverBrush as SolidColorBrush).Color,
                                             (grid.RowBackground as SolidColorBrush).Color,
                                             (grid.AlternatingRowBackground as SolidColorBrush).Color,
                                             (grid.SelectedBackground as SolidColorBrush).Color,
                                             (grid.VerticalGridLinesBrush as SolidColorBrush).Color,
                                             (grid.Foreground as SolidColorBrush).Color,
                                             (grid.RowForeground as SolidColorBrush).Color,
                                             (grid.AlternatingRowForeground as SolidColorBrush).Color,
                                             (grid.PressedBrush as SolidColorBrush).Color,
                                             (grid.ValidationBackground as SolidColorBrush).Color,
                                             (grid.ValidationForeground as SolidColorBrush).Color,
                                             (grid.HeaderBackground as SolidColorBrush).Color,
                                             (grid.HeaderForeground as SolidColorBrush).Color,
                                             (grid.GroupingPanelBackground as SolidColorBrush).Color,
                                             (grid.GroupingPanelForeground as SolidColorBrush).Color);
                var window = new C1Window();
                window.Content = new System.Windows.Controls.TextBox()
                {
                    Text = style, FontSize = 16
                };
                window.ShowModal();
                window.CenterOnScreen();
            }
            catch
            {
            }
        }
 private void ShowWindow(bool showModal)
 {
     C1Window wnd = new C1Window();
     wnd.Header = "This is the header.";
     wnd.Height = 300;
     wnd.Width = 300;
     wnd.Content = new WindowContent();
     wnd.CenterOnScreen();
     if (showModal)
         wnd.ShowModal();
     else
         wnd.Show();
 }
Esempio n. 4
0
        private void btnPrintSettings_Click(object sender, RoutedEventArgs e)
        {
            // show editor in a dialog
            C1Window w = new C1Window();

            w.Header     = C1.WPF.Olap.Resources.Resources.DocumentOptions;
            w.FontFamily = FontFamily;
            w.FontSize   = FontSize;
            w.Content    = new C1OlapReportOptions(_reportOptions);
            w.Width      = 600;
            w.Height     = 350;
            w.CenterOnScreen();
            w.ModalBackground = new SolidColorBrush(Color.FromArgb(80, 80, 80, 80));
            w.ShowModal();
        }
Esempio n. 5
0
 private void btnPrintSettings_Click(object sender, RoutedEventArgs e)
 {
     // show editor in a dialog
     C1Window w = new C1Window();
     w.Header = C1.WPF.Olap.Resources.Resources.DocumentOptions;
     w.FontFamily = FontFamily;
     w.FontSize = FontSize;
     w.Content = new C1OlapReportOptions(_reportOptions);
     w.Width = 600;
     w.Height = 350;
     w.CenterOnScreen();
     w.ModalBackground = new SolidColorBrush(Color.FromArgb(80, 80, 80, 80));
     w.ShowModal();
 }
 private void btnExportStyle_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         string style = string.Format(@"<Style x:Key=""MyGridStyle"" TargetType=""c1dg:C1DataGrid"">
     <Setter Property=""Background"" Value=""{0}""/>
     <Setter Property=""BorderBrush"" Value=""{1}""/>
     <Setter Property=""HorizontalGridLinesBrush"" Value=""{2}""/>
     <Setter Property=""MouseOverBrush"" Value=""{3}""/>
     <Setter Property=""PressedBrush"" Value=""{11}""/>
     <Setter Property=""RowBackground"" Value=""{4}""/>
     <Setter Property=""AlternatingRowBackground"" Value=""{5}""/>
     <Setter Property=""SelectedBackground"" Value=""{6}""/>
     <Setter Property=""VerticalGridLinesBrush"" Value=""{7}""/>
     <Setter Property=""Foreground"" Value=""{8}""/>
     <Setter Property=""RowForeground"" Value=""{9}""/>
     <Setter Property=""AlternatingRowForeground"" Value=""{10}""/>
     <Setter Property=""ValidationBackground"" Value=""{12}""/>
     <Setter Property=""ValidationForeground"" Value=""{13}""/>
     <Setter Property=""HeaderBackground"" Value=""{14}""/>
     <Setter Property=""HeaderForeground"" Value=""{15}""/>
     <Setter Property=""GroupingPanelBackground"" Value=""{16}""/>
     <Setter Property=""GroupingPanelForeground"" Value=""{17}""/>
     </Style>",
      (grid.Background as SolidColorBrush).Color,
      (grid.BorderBrush as SolidColorBrush).Color,
      (grid.HorizontalGridLinesBrush as SolidColorBrush).Color,
      (grid.MouseOverBrush as SolidColorBrush).Color,
      (grid.RowBackground as SolidColorBrush).Color,
      (grid.AlternatingRowBackground as SolidColorBrush).Color,
      (grid.SelectedBackground as SolidColorBrush).Color,
      (grid.VerticalGridLinesBrush as SolidColorBrush).Color,
      (grid.Foreground as SolidColorBrush).Color,
      (grid.RowForeground as SolidColorBrush).Color,
      (grid.AlternatingRowForeground as SolidColorBrush).Color,
      (grid.PressedBrush as SolidColorBrush).Color,
      (grid.ValidationBackground as SolidColorBrush).Color,
      (grid.ValidationForeground as SolidColorBrush).Color,
      (grid.HeaderBackground as SolidColorBrush).Color,
      (grid.HeaderForeground as SolidColorBrush).Color,
      (grid.GroupingPanelBackground as SolidColorBrush).Color,
      (grid.GroupingPanelForeground as SolidColorBrush).Color);
         var window = new C1Window();
         window.Content = new System.Windows.Controls.TextBox() { Text = style, FontSize = 16 };
         window.ShowModal();
         window.CenterOnScreen();
     }
     catch
     {
     }
 }