We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Creating a PDF form using XML and XSD

Hello,

the company where I am working already owns a license of Essential Studio and at the moment we are evaluating other features to decide if upgrading our license.
We are interested in creating PDF forms and we have some questions.
Is it possible to dynamically create a PDF form according to a XSD definition? Has it to be done manually reading the XSD and creating a control for each XSD element definition or there is any automatic features? 
Is it possible to direct export PDF form filled data into XML format or we have to do it manually?

Thanks for your reply and best regards,
Barbara

12 Replies

KK Karthik Krishnaraj Syncfusion Team February 24, 2015 12:44 PM UTC

Hi Barbara,

Thank you for using syncfusion products.

Yes it is possible to “Export pdf form filled data to xml format”, I have attached the simple sample for your reference in the below link, please check with this and let me know whether your expectation is fulfilled.

Sample Link:

http://www.syncfusion.com/downloads/support/directtrac/general/Export_Pdf_form-1778345722.zip

For  your query regarding “Is it possible to create a Pdf form using XSD definition”. As of now we don’t have support for this. We will implement this feature in any of our upcoming release and will let you know.

Feature Link:

http://www.syncfusion.com/support/directtrac/features/WF-18670

Thanks,

Karthik.



BT Barbara Tacchino February 25, 2015 10:40 AM UTC

Hi Karthik,

thanks for your reply. I tried your example concerning export pdf form data to xml and I noticed that PdfLoadedListBoxField data and PdfLoadedComboBoxField ones are not contained in the exported xml file even if those fields have been filled. Is it necessary to specify anywhere that those fields have to be included in the export file?

Best regards,
Barbara


KK Karthik Krishnaraj Syncfusion Team February 26, 2015 10:38 AM UTC

Hi Barbara,

We have checked with your issue with “Field data not contained in exported XML” and we can’t able to reproduce it, can you please provide the input file which you have tried to reproduce the issue, this help will help us to find the actual root cause and provide you solution better.

Thanks,

Karthik



BT Barbara Tacchino February 27, 2015 08:11 AM UTC

Hi Karthik,
thanks for your reply. At the moment I cannot send you the involved PDF file since it contains data that belong to our customers. I will contact you as soon as we start the development of this project in case this problem persists.

Best regards,
Barbara


KK Karthik Krishnaraj Syncfusion Team March 2, 2015 11:00 AM UTC

Hi Barbara,

Thank you for your update. You can use our direct trac for preserving your data and it will be secured, you can create a new incident regarding this issue and we will be happy to help you out.

Thanks,

Karthik.



FE fernando replied to Karthik Krishnaraj October 3, 2016 11:14 PM UTC

Hi Barbara,

Thank you for your update. You can use our direct trac for preserving your data and it will be secured, you can create a new incident regarding this issue and we will be happy to help you out.

Thanks,

Karthik.


Hi 
I have a problem with the example of convert the format xml to pdf

I am Using WPF (Windows Presentation Foundation) and also I am using 

Diagramming of Syncfusion.



my xml file is the next.

Attachment: myxmlfile_83f185ed.rar


KR Keerthivasan Ramamoorthy Syncfusion Team October 4, 2016 03:03 PM UTC

Hi Fernando, 
Requirement: “Need to convert xml file (Diagraming object) to Pdf”. 
We have analyzed and achieve your requirement in Diagram Builder sample. We have provided a code example to represent this. Please refer to the below code example. 
Add the below C# code in DiagramBuilderVM.cs file. 
C# code example:  
//create a new Command for Load and Load a xml file to Diagram page 
public void OnLoadCommand(object param) 
{ 
if (SelectedDiagram.Nodes != null) 
(SelectedDiagram.Nodes as ObservableCollection<NodeVM>).Clear(); 
if (SelectedDiagram.Connectors != null) 
(SelectedDiagram.Connectors as ObservableCollection<ConnectorVM>).Clear(); 
FileStream fs = new FileStream("Diagram.xml", FileMode.Open, FileAccess.Read); 
(SelectedDiagram.Info as IGraphInfo).Load(fs); 
fs.Close(); 
} 
//create a new Command for PdfConvertor 
public void OnPdfConvertorCommand(object param) 
{ 
Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog(); 
saveFileDialog.Filter = "PDF File|*.pdf"; 
saveFileDialog.Title = "Save to a PDF file"; 
saveFileDialog.FileName = "Diagram"; 
saveFileDialog.ShowDialog(); 
if (!string.IsNullOrEmpty(saveFileDialog.FileName)) 
{ 
SaveFileDialog m_SaveFileDialog = new SaveFileDialog(); 
m_SaveFileDialog = new SaveFileDialog(); 
m_SaveFileDialog.Filter = "XPS File(*.xps)|*.xps"; 
m_SaveFileDialog.FileName = "DiagramExport"; 
string name = m_SaveFileDialog.FileName; 
ExportSettings es = new ExportSettings(); 
es.FileName = name; 
es.IsSaveToXps = true; 
(SelectedDiagram.Info as IGraph).ExportSettings = es; 
(SelectedDiagram.Info as IGraphInfo).Export(); 
Syncfusion.XPS.XPSToPdfConverter converter1 = new Syncfusion.XPS.XPSToPdfConverter(); 
//Convert XPS document into PDF document 
PdfDocument document = converter1.Convert(name); 
//save and close the document 
document.Save(saveFileDialog.FileName); 
document.Close(true); 
} 
} 
Also, provided XAML code to bind the Load and PdfConvertor Command in a Button. Please refer to the below code,  
  
<syncfusion:BackStageCommandButton  Header="Load" Command="{Binding DataContext.Load,Mode=TwoWay,ElementName=ribbon}" ></syncfusion:BackStageCommandButton> 
<syncfusion:BackStageCommandButton Header="PdfConvertor" Command="{Binding DataContext.PdfConvertor,Mode=TwoWay,ElementName=ribbon}" ></syncfusion:BackStageCommandButton> 
  
Note:   
We have provided a video to represent the Conversion of xml file (Diagraming object) to Pdf. Please refer to the video link as below.  
 Video link:47229_Video

 
Regards, 
Keerthivasan R.  
 



FE fernando replied to Keerthivasan Ramamoorthy October 4, 2016 03:24 PM UTC

Hi Fernando, 
Requirement: “Need to convert xml file (Diagraming object) to Pdf”. 
We have analyzed and achieve your requirement in Diagram Builder sample. We have provided a code example to represent this. Please refer to the below code example. 
Add the below C# code in DiagramBuilderVM.cs file. 
C# code example:  
//create a new Command for Load and Load a xml file to Diagram page 
public void OnLoadCommand(object param) 
{ 
if (SelectedDiagram.Nodes != null) 
(SelectedDiagram.Nodes as ObservableCollection<NodeVM>).Clear(); 
if (SelectedDiagram.Connectors != null) 
(SelectedDiagram.Connectors as ObservableCollection<ConnectorVM>).Clear(); 
FileStream fs = new FileStream("Diagram.xml", FileMode.Open, FileAccess.Read); 
(SelectedDiagram.Info as IGraphInfo).Load(fs); 
fs.Close(); 
} 
//create a new Command for PdfConvertor 
public void OnPdfConvertorCommand(object param) 
{ 
Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog(); 
saveFileDialog.Filter = "PDF File|*.pdf"; 
saveFileDialog.Title = "Save to a PDF file"; 
saveFileDialog.FileName = "Diagram"; 
saveFileDialog.ShowDialog(); 
if (!string.IsNullOrEmpty(saveFileDialog.FileName)) 
{ 
SaveFileDialog m_SaveFileDialog = new SaveFileDialog(); 
m_SaveFileDialog = new SaveFileDialog(); 
m_SaveFileDialog.Filter = "XPS File(*.xps)|*.xps"; 
m_SaveFileDialog.FileName = "DiagramExport"; 
string name = m_SaveFileDialog.FileName; 
ExportSettings es = new ExportSettings(); 
es.FileName = name; 
es.IsSaveToXps = true; 
(SelectedDiagram.Info as IGraph).ExportSettings = es; 
(SelectedDiagram.Info as IGraphInfo).Export(); 
Syncfusion.XPS.XPSToPdfConverter converter1 = new Syncfusion.XPS.XPSToPdfConverter(); 
//Convert XPS document into PDF document 
PdfDocument document = converter1.Convert(name); 
//save and close the document 
document.Save(saveFileDialog.FileName); 
document.Close(true); 
} 
} 
Also, provided XAML code to bind the Load and PdfConvertor Command in a Button. Please refer to the below code,  
  
<syncfusion:BackStageCommandButton  Header="Load" Command="{Binding DataContext.Load,Mode=TwoWay,ElementName=ribbon}" ></syncfusion:BackStageCommandButton> 
<syncfusion:BackStageCommandButton Header="PdfConvertor" Command="{Binding DataContext.PdfConvertor,Mode=TwoWay,ElementName=ribbon}" ></syncfusion:BackStageCommandButton> 
  
Note:   
We have provided a video to represent the Conversion of xml file (Diagraming object) to Pdf. Please refer to the video link as below.  
 Video link:47229_Video

 
Regards, 
Keerthivasan R.  
 


the example is good, but in my window that I believe can not place el code why , i have problem the Object reference not set to an instance of an object
also  try collocate el code of example 

https://www.syncfusion.com/kb/6194/how-to-convert-xml-to-pdf  

and i have a error, my xml if is converted to pdf, but in the pdf  has my code of my xml file 

can you help me? 
with a interfaz of example

using un button that convert my xml file to pdf  



my xml file is of next 

Attachment: xml_e6f4c0e2.rar


FE fernando replied to fernando October 4, 2016 03:25 PM UTC

Hi Fernando, 
Requirement: “Need to convert xml file (Diagraming object) to Pdf”. 
We have analyzed and achieve your requirement in Diagram Builder sample. We have provided a code example to represent this. Please refer to the below code example. 
Add the below C# code in DiagramBuilderVM.cs file. 
C# code example:  
//create a new Command for Load and Load a xml file to Diagram page 
public void OnLoadCommand(object param) 
{ 
if (SelectedDiagram.Nodes != null) 
(SelectedDiagram.Nodes as ObservableCollection<NodeVM>).Clear(); 
if (SelectedDiagram.Connectors != null) 
(SelectedDiagram.Connectors as ObservableCollection<ConnectorVM>).Clear(); 
FileStream fs = new FileStream("Diagram.xml", FileMode.Open, FileAccess.Read); 
(SelectedDiagram.Info as IGraphInfo).Load(fs); 
fs.Close(); 
} 
//create a new Command for PdfConvertor 
public void OnPdfConvertorCommand(object param) 
{ 
Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog(); 
saveFileDialog.Filter = "PDF File|*.pdf"; 
saveFileDialog.Title = "Save to a PDF file"; 
saveFileDialog.FileName = "Diagram"; 
saveFileDialog.ShowDialog(); 
if (!string.IsNullOrEmpty(saveFileDialog.FileName)) 
{ 
SaveFileDialog m_SaveFileDialog = new SaveFileDialog(); 
m_SaveFileDialog = new SaveFileDialog(); 
m_SaveFileDialog.Filter = "XPS File(*.xps)|*.xps"; 
m_SaveFileDialog.FileName = "DiagramExport"; 
string name = m_SaveFileDialog.FileName; 
ExportSettings es = new ExportSettings(); 
es.FileName = name; 
es.IsSaveToXps = true; 
(SelectedDiagram.Info as IGraph).ExportSettings = es; 
(SelectedDiagram.Info as IGraphInfo).Export(); 
Syncfusion.XPS.XPSToPdfConverter converter1 = new Syncfusion.XPS.XPSToPdfConverter(); 
//Convert XPS document into PDF document 
PdfDocument document = converter1.Convert(name); 
//save and close the document 
document.Save(saveFileDialog.FileName); 
document.Close(true); 
} 
} 
Also, provided XAML code to bind the Load and PdfConvertor Command in a Button. Please refer to the below code,  
  
<syncfusion:BackStageCommandButton  Header="Load" Command="{Binding DataContext.Load,Mode=TwoWay,ElementName=ribbon}" ></syncfusion:BackStageCommandButton> 
<syncfusion:BackStageCommandButton Header="PdfConvertor" Command="{Binding DataContext.PdfConvertor,Mode=TwoWay,ElementName=ribbon}" ></syncfusion:BackStageCommandButton> 
  
Note:   
We have provided a video to represent the Conversion of xml file (Diagraming object) to Pdf. Please refer to the video link as below.  
 Video link:47229_Video

 
Regards, 
Keerthivasan R.  
 


the example is good, but in my window that I believe can not place el code why , i have problem the Object reference not set to an instance of an object
also  try collocate el code of example 

https://www.syncfusion.com/kb/6194/how-to-convert-xml-to-pdf  

and i have a error, my xml if is converted to pdf, but in the pdf  has my code of my xml file 

can you help me? 
with a interfaz of example

using un button that convert my xml file to pdf  



my xml file is of next 

Attachment: xml_e6f4c0e2.rar

the example is good, but in my window that I believe can not place el code why , i have problem the Object reference not set to an instance of an object
also  try collocate el code of example 

https://www.syncfusion.com/kb/6194/how-to-convert-xml-to-pdf  

and i have a error, my xml if is converted to pdf, but in the pdf  has my code of my xml file 

can you help me? 
with a interfaz of example

using un button that convert my xml file to pdf  

Attachment: xml_204e67b5.rar


KR Keerthivasan Ramamoorthy Syncfusion Team October 5, 2016 10:51 AM UTC

 Hi Frenando, 
  

Requirement: “Need to convert xml file (Diagraming object) to Pdf”. 

The output of the xml to pdf converter was preserved as how browser it displays. We have provided xml to pdf converter output file as below. 

Pdf File: PDF_file 

Note: 
We don’t have support for converting the xml file to visual object. As we have updated in the last update, the xml file is loaded to the diagram page and convert it to XPS file then it can be converted to pdf document. In order to achieve your requirement, we used the code what we have provided in the last update. 
 
Regards, 
Keerthivasan R.  



FE fernando replied to Keerthivasan Ramamoorthy October 6, 2016 06:40 AM UTC

 Hi Frenando, 
  

Requirement: “Need to convert xml file (Diagraming object) to Pdf”. 

The output of the xml to pdf converter was preserved as how browser it displays. We have provided xml to pdf converter output file as below. 

Pdf File: PDF_file 

Note: 
We don’t have support for converting the xml file to visual object. As we have updated in the last update, the xml file is loaded to the diagram page and convert it to XPS file then it can be converted to pdf document. In order to achieve your requirement, we used the code what we have provided in the last update. 
 
Regards, 
Keerthivasan R.  


Hi

how can i collect a SFDatagrid in Diagramming index
my example is the next 

I want you to show me sfdatagrid as I show in my image of example 

my class is:

<syncfusion:RibbonWindow x:Class="Soriana.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:utility="clr-namespace:Soriana.Utility"
        xmlns:viewModel="clr-namespace:Soriana.ViewModel"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        xmlns:view="clr-namespace:Soriana.View"
                         xmlns:local="clr-namespace:Soriana"
                         Office2010Icon="/Resources/syncfusion.png"
       IsGlassActive="False"
                         Icon="App.ico"
                         
        x:Name="diagrambuilder" UseLayoutRounding="True" SnapsToDevicePixels="True"
        Title="Print and Export" Height="350" Width="525" WindowStartupLocation="CenterScreen" WindowState="Maximized">
    
    <Window.DataContext>
        <viewModel:DiagramBuilderVM>
        </viewModel:DiagramBuilderVM>
    </Window.DataContext>

    <Grid Background="Transparent" UseLayoutRounding="True" SnapsToDevicePixels="True">
        <Grid.Resources>
            <BitmapImage x:Key="newpagepng" UriSource="../../Resources/New-page.png" />
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" VerticalAlignment="Top" UseLayoutRounding="True" SnapsToDevicePixels="True">
            <Grid.Resources>
                <Style x:Key="ribbonstyle" TargetType="syncfusion:Ribbon" BasedOn="{StaticResource Office2013RibbonStyle}">
                </Style>
            </Grid.Resources>

            <syncfusion:Ribbon EnableMoreCommands="False" Style="{StaticResource ribbonstyle}" UseLayoutRounding="True" SnapsToDevicePixels="True" TextOptions.TextRenderingMode="ClearType" 
                                 TextOptions.TextFormattingMode="Display"  x:Name="ribbon" BackStageHeader="File" ItemsSource="{Binding DataContext.DiagramCommandsVM.DiagramTabs,ElementName=diagrambuilder}">
                <!--button File-->
                <syncfusion:Ribbon.ItemContainerStyle>
                    <Style TargetType="{x:Type syncfusion:RibbonTab}" >
                        <Setter Property="Caption" Value="{Binding Header}"></Setter>
                        <Setter Property="ItemsSource" Value="{Binding DiagramGroups}"/>
                        <Setter Property="IsChecked" Value="False"></Setter>
                        <Setter Property="ItemContainerStyle">
                            <Setter.Value>
                                <Style TargetType="{x:Type syncfusion:RibbonBar}"  BasedOn="{StaticResource Office2013RibbonBarStyle}">
                                    <Setter Property="Header" Value="{Binding Header}"/>
                                    <Setter Property="ItemsSource" Value="{Binding DiagramButtons}"/>
                                    <Setter Property="IsLauncherButtonVisible" Value="False"/>

                                    <Setter Property="ItemTemplateSelector" Value="{StaticResource DisplayControlSelector}"></Setter>
                                    <Style.Triggers>
                                        <Trigger Property="Header" Value="ClipBoard">
                                            <Setter Property="ItemsPanel">
                                                <Setter.Value>
                                                    <ItemsPanelTemplate>
                                                        <view:CustomGrid Header="ClipBoard"></view:CustomGrid>
                                                    </ItemsPanelTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                        <Trigger Property="Header" Value="Font">
                                            <Setter Property="ItemsPanel">
                                                <Setter.Value>
                                                    <ItemsPanelTemplate>
                                                        <WrapPanel Width="230">
                                                        </WrapPanel>
                                                    </ItemsPanelTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                        <Trigger Property="Header" Value="Paragraph">
                                            <Setter Property="ItemsPanel">
                                                <Setter.Value>
                                                    <ItemsPanelTemplate>
                                                        <WrapPanel Width="80">
                                                        </WrapPanel>
                                                    </ItemsPanelTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                       
                                        
                                        <Trigger Property="Header" Value="ShapeStyle">
                                            <Setter Property="ItemsPanel">
                                                <Setter.Value>
                                                    <ItemsPanelTemplate>
                                                        <view:CustomGrid Header="ShapeStyle"></view:CustomGrid>
                                                  
                                                    </ItemsPanelTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                     
                                        <Trigger Property="Header" Value="Show">
                                            <Setter Property="ItemsPanel">
                                                <Setter.Value>
                                                    <ItemsPanelTemplate>
                                                        <view:CustomGrid Header="Show"></view:CustomGrid>
                                                    </ItemsPanelTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                   
                                    </Style.Triggers>
                                </Style>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </syncfusion:Ribbon.ItemContainerStyle>
                <syncfusion:Ribbon.QuickAccessToolBar>
                    <syncfusion:QuickAccessToolBar>
                        <syncfusion:QuickAccessToolBar.QATMenuItems>
                            <!--<syncfusion:RibbonButton Label="Save" syncfusion:RibbonCommandManager.SynchronizedItem="Save" />-->
                            <syncfusion:RibbonButton Label="Load" syncfusion:RibbonCommandManager.SynchronizedItem="Load" />
                            <!--<syncfusion:RibbonButton Label="ViewFile and Print" syncfusion:RibbonCommandManager.SynchronizedItem="ViewFile" Click="RibbonButton_Click" />-->
                            <!--<syncfusion:RibbonButton Label="Print" syncfusion:RibbonCommandManager.SynchronizedItem="Print" Click="RibbonButton_Click_1" />-->
                            <!--<syncfusion:RibbonButton Label="Change Date Xml" syncfusion:RibbonCommandManager.SynchronizedItem="Print" Click="RibbonButton_Click_2" />--><!--Julio codigo merch entre db y xml diagram--> 
                            <!--<syncfusion:RibbonButton Label="Search Folio" syncfusion:RibbonCommandManager.SynchronizedItem="Search Folio" Click="RibbonButton_Click_search" />-->
                            <!--<syncfusion:RibbonButton Label="reprint Folio" syncfusion:RibbonCommandManager.SynchronizedItem="reprint Folio" Click="RibbonButton_Click_reprint" />-->
                            <!--<syncfusion:RibbonButton Label="pruebapdf" syncfusion:RibbonCommandManager.SynchronizedItem="pruebapdf" Click="pruebapdfButton_Click_search" />-->
                            <!--<syncfusion:RibbonButton Label="Undo" syncfusion:RibbonCommandManager.SynchronizedItem="Undo"/>
                            <syncfusion:RibbonButton Label="Redo" syncfusion:RibbonCommandManager.SynchronizedItem="Redo" />-->
                        </syncfusion:QuickAccessToolBar.QATMenuItems>
                        <syncfusion:RibbonButton Label="Load"
                                                 SizeForm="ExtraSmall"
                                                 SmallIcon="/Resources/Load.png"
                                                 Command="{Binding DataContext.Open ,ElementName=diagrambuilder}"
                                                 ToolTip="Load" 
                                                 syncfusion:RibbonCommandManager.SynchronizedItem="Load"
                                                 />
                    </syncfusion:QuickAccessToolBar>
                </syncfusion:Ribbon.QuickAccessToolBar>

                <!--  Back Stage  -->
                <syncfusion:Ribbon.BackStage>
                    <syncfusion:Backstage>
                        <syncfusion:BackstageTabItem Header="Bienvenido">
                            <Grid Margin="10">
                                <StackPanel  HorizontalAlignment="Left" VerticalAlignment="Top">
                                </StackPanel>
                            </Grid>
                        </syncfusion:BackstageTabItem>

                        <!--Fernando codigo funcional-->
                        <syncfusion:BackStageCommandButton Header="Buscar Folio" Click="buscarfolioButton_Click"></syncfusion:BackStageCommandButton>
                        <syncfusion:BackStageCommandButton Header="Selectcionar Plantilla " syncfusion:RibbonCommandManager.SynchronizedItem="Load"></syncfusion:BackStageCommandButton>
                        <!--<syncfusion:BackStageCommandButton Header="Generar Pdf" Command="{Binding DataContext.Export,Mode=TwoWay,ElementName=ribbon}" ></syncfusion:BackStageCommandButton>-->
                        <!--<syncfusion:BackStageCommandButton Header="View File PDF" Click="viewfileprintButton_Click"></syncfusion:BackStageCommandButton>
                        <syncfusion:BackStageCommandButton Header="Shearch Folio" Click="searchfolioButton_Click"></syncfusion:BackStageCommandButton>
                        <syncfusion:BackStageCommandButton Header="About" Click="printButton_Click"></syncfusion:BackStageCommandButton>-->
                        <!--Fin del codigo funcional-->
                        <syncfusion:BackStageCommandButton Header="Close" Click="CloseButton_Click"></syncfusion:BackStageCommandButton>
                    
                    </syncfusion:Backstage>
                </syncfusion:Ribbon.BackStage>
            </syncfusion:Ribbon>

        </Grid>
        <!--zukop-->
        <view:DiagramBuilder1 x:Name="Builder1" Margin="0,24,0,0" Grid.RowSpan="2"/>
        
        <!--<syncfusion:SfDiagram Grid.Row="1" x:Name="diagram">
            <syncfusion:SfDiagram.SnapSettings>
                <syncfusion:SnapSettings SnapConstraints="ShowLines"/>
            </syncfusion:SfDiagram.SnapSettings>
        </syncfusion:SfDiagram>-->
        <!--<syncfusion:SfDiagram Grid.Row="1" x:Name="diagram"></syncfusion:SfDiagram>-->
    </Grid>

    <syncfusion:RibbonWindow.StatusBar>

        <syncfusion:RibbonStatusBar Grid.Row="2" Height="26">
            <Grid Margin="0,0,10,0" HorizontalAlignment="Right" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="20"></ColumnDefinition>
                    <ColumnDefinition Width="100"></ColumnDefinition>
                    <ColumnDefinition Width="20"></ColumnDefinition>
                    <ColumnDefinition Width="50"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>

          
                <RepeatButton Grid.Column="2">
                    <RepeatButton.Style>
                        <Style TargetType="{x:Type RepeatButton}">
                            <Setter Property="Command" Value="{Binding ZoomIn}" />
                            <Setter Property="ToolTip" Value="ZoomIn"/>
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                                        <Viewbox Width="13" Height="13">
                                            <Grid Background="Transparent">
                                                <Path Width="16"
                                                          Height="16"
                                                          Margin="0,0,0,0"
                                                          Data="M19.833,0L32.501,0 32.501,19.833999 52.334,19.833999 52.334,32.500999 32.501,32.500999 32.501,52.333 19.833,52.333 19.833,32.500999 0,32.500999 0,19.833999 19.833,19.833999z"
                                                          Fill="#A7b409" 
                                                          RenderTransformOrigin="0.5,0.5"
                                                          Stretch="Uniform">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <TransformGroup.Children>
                                                                <RotateTransform Angle="0" />
                                                                <ScaleTransform ScaleX="-1" ScaleY="-1" />
                                                            </TransformGroup.Children>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                            </Grid>
                                        </Viewbox>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Opacity" Value="0.5" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </RepeatButton.Style>
                </RepeatButton>

                <!--<syncfusion:sli-->
                <!--<Slider Grid.Column="1" Minimum="0.3"  Margin="5" Maximum="3" TickFrequency="0.1" Tag="FitToPage" Value="{Binding SelectedDiagram.SelectedItems.Scale, Mode=TwoWay}"/>-->

                <Slider Grid.Column="1" IsMoveToPointEnabled="True"
                        Minimum="0.3"  Margin="5" Maximum="3" 
                        TickFrequency="0.1" 
                        Tag="FitToPage" 
                        Value="{Binding SelectedDiagram.SelectedItems.Scale, Mode=TwoWay}" ToolTip="Zoom">
                    <Slider.Style>
                        <Style TargetType="{x:Type Slider}">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type Slider}">
                                        <Grid>
                                            <Border     Height="2"
                                                        VerticalAlignment="center"
                                                        Background="White"
                                                        BorderBrush="White"
                                                        BorderThickness="1"
                                                        CornerRadius="1">
                                                <Canvas >
                                                    <Rectangle x:Name="PART_SelectionRange"
                                                                   Height="2.0"                                                                  
                                                                   StrokeThickness="1.0"
                                                                   Visibility="Visible" />
                                                </Canvas>
                                            </Border>
                                            <Track x:Name="PART_Track" >
                                                <Track.Thumb>
                                                    <Thumb Foreground="#A7b409">
                                                        <Thumb.Style>
                                                            <Style TargetType="{x:Type Thumb}">
                                                                <Setter Property="Template">
                                                                    <Setter.Value>
                                                                        <ControlTemplate TargetType="{x:Type Thumb}">
                                                                            <Rectangle Fill="{TemplateBinding Foreground}" Height="15" Width="3"/>
                                                                        </ControlTemplate>
                                                                    </Setter.Value>
                                                                </Setter>
                                                            </Style>
                                                        </Thumb.Style>
                                                    </Thumb>
                                                </Track.Thumb>
                                            </Track>
                                        </Grid>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Opacity" Value="0.5" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Slider.Style>
                </Slider>
                
                <!--<syncfusion:RibbonButton Margin="0,0,0,10"  FontSize="13" Style="{StaticResource buttonstyle}" Command="{Binding ZoomOut}" Label="&#x268A;" Grid.Column="0" Foreground="White" IsSmallImageVisible="False"></syncfusion:RibbonButton>-->
                <RepeatButton x:Name="incrementButton" Grid.Column="0" >
                    <RepeatButton.Style>
                        <Style TargetType="{x:Type RepeatButton}">
                            <Setter Property="Command" Value="{Binding ZoomOut}" />
                            <Setter Property="ToolTip" Value="ZoomOut"/>
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                                        <Viewbox Width="13" Height="13">
                                            <Grid Background="Transparent">
                                                <Path Width="16"
                                                          Height="16"
                                                          Margin="0,0,0,0"
                                                          Data="M0,0L53.333,0 53.333,8.888 0,8.888z"
                                                          Fill="#FFFFFFFF"
                                                          RenderTransformOrigin="0.5,0.5"
                                                          Stretch="Uniform">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <TransformGroup.Children>
                                                                <RotateTransform Angle="0" />
                                                                <ScaleTransform ScaleX="-1" ScaleY="-1" />
                                                            </TransformGroup.Children>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                            </Grid>
                                        </Viewbox>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Opacity" Value="0.5" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </RepeatButton.Style>
                </RepeatButton>
                <TextBlock Margin="5" Foreground="White" ToolTip="Zoom level. Click to Open the Zoom Dialog Box." Text="{Binding SelectedDiagram.SelectedItems.Scale,Converter={StaticResource TexttoPercentageConverter}}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown" Grid.Column="3"></TextBlock>

                <syncfusion:RibbonButton Tag="FitToPage" SizeForm="ExtraSmall" Grid.Column="4" 
                  Command="{Binding SelectedDiagram.Info.Commands.FitToPage}" ToolTip="Fit Page to current window"
                                         SmallIcon="\Resources\fullscreen-16x16-1.png">
                    <syncfusion:RibbonButton.CommandParameter>
                        <syncfusion:FitToPageParameter FitToPage="FitToPage" Margin="20" />
                    </syncfusion:RibbonButton.CommandParameter>
                </syncfusion:RibbonButton>

               
            </Grid>
            
        </syncfusion:RibbonStatusBar>
      
    </syncfusion:RibbonWindow.StatusBar>


</syncfusion:RibbonWindow>


Attachment: example_f798277a.rar


JG Jai Ganesh S Syncfusion Team October 7, 2016 01:30 PM UTC

Hi Frenando, 
 
We cannot understand your requirement clearly but we suspect that you want to show the SfDataGrid   in Ribbon window. We have prepared a sample based on this and please find the sample from the below location, 
 
 
If we misunderstood your requirement, please share more details about your requirement. This would be more helpful for us to analyze further. 
 
Regards, 
Jai Ganesh S 
 


Loader.
Live Chat Icon For mobile
Up arrow icon