Telerik Forums
UI for WPF Forum
1 answer
122 views
Hi.

I tried to print out the chart.
I created some codes with reference to the source code of demo project(Export PDF/Print), but following exception has occurred.

I've tried to save docx file. It worked fine. please check my codes......

----------------------------------------------------------------------------------------------------------------------------------------------


private void PrintChart()
{
            RadRichTextBox RadRichTextBox1 = new RadRichTextBox();
            RadRichTextBox1.Document = CreateDocument();

// below line made a exception : NullReferenceException was unhandled
            RadRichTextBox1.Print("test",PrintMode.Native);


}



        private void CreateChartDocumentPart(RadDocument document)
        {
            Telerik.Windows.Documents.Model.Section section = new Telerik.Windows.Documents.Model.Section();
            Telerik.Windows.Documents.Model.Paragraph paragraph = new Telerik.Windows.Documents.Model.Paragraph();


            MemoryStream ms = new MemoryStream();
            currentChart.ExportToImage(ms, new PngBitmapEncoder());


            double imageWidth = currentChart.ActualWidth;
            double imageHeight = currentChart.ActualHeight;
            if (imageWidth > 625)
            {
                imageWidth = 625;
                imageHeight = currentChart.ActualHeight * imageWidth / currentChart.ActualWidth;
            }


            ImageInline image = new ImageInline(ms, new Size(imageWidth, imageHeight), "png");


            paragraph.Inlines.Add(image);
            section.Blocks.Add(paragraph);
            document.Sections.Add(section);


            ms.Close();
        }



        private RadDocument CreateDocument()
        {
            RadDocument document = new RadDocument();


            this.CreateChartDocumentPart(document);
            //this.CreateGridDocumentPart(document);


            return document;
        }


Nikolay
Telerik team
 answered on 13 Jan 2012
3 answers
467 views
Hello Telerik Team,

Is it possible to remove the border around the ChildTableDefinition?

See attached image where I have marked the border using red rectangles. Note that I want to remove the border completely on all sides of the child grid

Thanks,
Kumar
Maya
Telerik team
 answered on 13 Jan 2012
2 answers
172 views
Hi everyone,

A simple question - but I'm not sure it's a simple answer :) ...

Is there a straight forward way to enable tiles to be dragged (copied or moved) between two or more instances of a TileView?

I'm developing an audio performance app that allows the user to create multiple playlists (each playlist being a viewmodel/view in a collection). I'm using the TileView to display the 'tracks' in the playlist, as it has the right combination of selection, click n' drag and re-ordering animations that I was looking for - but in addition to dragging tracks (tiles) around to reorder them in a playlist (tileview), I'd also like to be able to drag them across into other playlists (additional tileviews).

Any thoughts? 

Thanks!

Oli.
Oli
Top achievements
Rank 1
 answered on 12 Jan 2012
5 answers
211 views
Hi,

I need to use in my project a Treeview in hidding Pane, when i use it  with DocumentHost the Pane don't hide after lost focus.

<telerikDocking:RadDocking d:LayoutOverrides="Width">
             
            <telerikDocking:RadDocking.DocumentHost>
                    <Grid Name="NotDockable" Background="Black" Height="340">
                        <TextBlock Foreground="Aquamarine">
                            lalalalaaallal                 
                        </TextBlock>              
                    </Grid>
            </telerikDocking:RadDocking.DocumentHost>
             
            <telerikDocking:RadSplitContainer>
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane Header="Pane 1" CanUserClose="False" CanFloat="False" CanDockInDocumentHost="False" />
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
        </telerikDocking:RadDocking>

All controls on the page must be dockable?

Thank you,
Ivo
Telerik team
 answered on 12 Jan 2012
2 answers
243 views
After I publish a WPF application and then try to install it . . . I get the following error:

Unable to install or run the application. The application requires that assembly Telerik.Windows.Data Version 2010.2.924.40 be installed in the Global Assembly Cache (GAC) first.

I am using Version 2010.3.1314.40 . . . so I am not sure why an earlier version is required. In the properties of Telerik.Windows.Data,
Copy Local is set to true. So if this copies the assembly to the client machine that I assume this should resolve the issue, but it has not.

I have attached an image of the full properties of Telerik.Windows.Data.

Please help if you have any ideas.

Thanks.

Kellie
Top achievements
Rank 1
 answered on 12 Jan 2012
9 answers
515 views
I have a scenario where i have two grids side-by-side in my WPF app and as i scroll one grid id like to scroll the second one to keep in sync. both grids will contain one column that will have a matching key.

how can i accomplish this?
Maya
Telerik team
 answered on 12 Jan 2012
2 answers
70 views
Hi,

I want to disable some buttons when I have more that one dataseries in the chart. So I have chosen DataBound event of chart. But I can not access to number of dataseries which was loaded into grid at that moment. I have seen number of data series in some private properties of chart by using Quick Watch window but I can not see in public ones (number of data series).

Thanks in advance.
MahMah
Top achievements
Rank 1
 answered on 12 Jan 2012
2 answers
107 views

Hi Guys,
              i have a gridView, The idea is to tab throught the different entries in the grid.

Problem:  When I try to tab through the entries a dotted border kind of a thing appears when I tab the first time. When I tab the second time then the focus moves to the next row.
Could anyone please tell me why the dotted border is appearing and how can i get rid of it.

best regards,
prithu

prithu
Top achievements
Rank 1
 answered on 12 Jan 2012
3 answers
929 views
Hi, please help me on this. i've searched everywhere but seems like noting working and it's stressed me out

i have a gridview and need to enable row click event to get the ID of the users.

currently, im able to click at each cell and display the value belong to it. but it should only display the ID of the row even we click different cell (in the same row).

i dont want this function occur at headers. how to do this? and can it works if we dont display the ID in the gridview?

i disclose my codes below

please help me guys, it's very urgent...tq

xaml:
<telerik:RadGridView Grid.Row="1" x:Name="radGridView"
   telerik:Theming.Theme="Expression_Dark" 
   HorizontalAlignment="Stretch"
   VerticalAlignment="Stretch"
   AutoGenerateColumns="False"
   IsReadOnly="True"
   CanUserFreezeColumns="False"
   RowIndicatorVisibility="Collapsed"
   Margin="0,0,0,27" ShowGroupPanel="False">
<telerik:RadGridView.Columns>
   <telerik:GridViewToggleRowDetailsColumn />
   <telerik:GridViewDataColumn DataMemberBinding="{Binding No}" Header="No."/>
   <telerik:GridViewDataColumn DataMemberBinding="{Binding Adm_Date}" Header="Date Admission" />
   <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>

code behind:
this.radGridView.AddHandler(GridViewCell.MouseLeftButtonDownEvent, new MouseButtonEventHandler(MouseDownOnCell), true);
 
private void MouseDownOnCell(object sender, MouseButtonEventArgs e)
{
  try
   {
       object cellValue = ((UIElement)e.OriginalSource).ParentOfType<GridViewCell>().Value;
       MessageBox.Show("Click on : " + cellValue.ToString());
   }
  catch (Exception ex)
   {
       MessageBox.Show(ex.Message);
       return;
   }
}
Maya
Telerik team
 answered on 12 Jan 2012
2 answers
171 views
Hi !

I have a WPF Browser Application, which worked good with Release Q2 of Telerik WPF components.

I just updated them to latest stable Q3 release, and now the the OrientedGroupHeaderContentTemplate does
not work anymore. It will only display the default resource view - i've changed nothing in my xaml ...

can you please help me, it's very urgent

snippet from my xaml

<scheduleView:OrientedGroupHeaderContentTemplateSelector x:Key="GroupHeaderContentTemplateSelector">
            <!-- Default templates: -->
            <scheduleView:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
                <DataTemplate>
                    <Border Background="#959595" Width="310" Margin="0 0 0 0">
                        <StackPanel Margin="5 5 5 5" Orientation="Horizontal">
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Group}" HorizontalAlignment="Left" Width="150"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="|"  HorizontalAlignment="Center" Width="10"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Name}"  HorizontalAlignment="Left" Width="150"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </scheduleView:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
            <scheduleView:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
                <DataTemplate>
                    <Border Background="#959595" Width="310" Margin="0 0 0 0">
                        <StackPanel Margin="5 5 5 5" Orientation="Horizontal">
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Group}" HorizontalAlignment="Left" Width="150"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="|"  HorizontalAlignment="Center" Width="10"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Name}"  HorizontalAlignment="Left" Width="150"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </scheduleView:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
        </scheduleView:OrientedGroupHeaderContentTemplateSelector>

and the scheduleview

<scheduleView:RadScheduleView x:Name="SchedulerMonat"
                                          ActiveViewDefinitionIndex="0"
                                          AppointmentsSource="{Binding Appointments}"
                                          ResourceTypesSource="{Binding ResourcesTypes}"
                                          GroupDescriptionsSource="{Binding GroupDescirptionSource}"
                                          GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderContentTemplateSelector}"
                                          SpecialSlotsSource="{Binding SpecialSlots}"
                                          SpecialSlotStyleSelector="{StaticResource SpecialSlotStyleSelector}"
                                          ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}"
                                          AppointmentCreating="SchedulerMonat_AppointmentCreating"
                                          AppointmentEditing="SchedulerMonat_AppointmentEditing"
                                          ShowDialog="SchedulerMonat_ShowDialog"
                                          VisibleRangeChanged="SchedulerMonat_VisibleRangeChanged"
                                          Margin="0,103,0,0"
                                           
                                          VisibleRangeChangedCommand="{Binding VisibleRangeChanged}"
                                          VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"
                                          AppointmentEdited="SchedulerMonat_AppointmentEdited"
                                          SnapAppointments="True"
                                          >
                <scheduleView:RadScheduleView.AppointmentStyleSelector>
                    <monatsmatrixWPF_extension:AppointmentStyleSelector Level200HorizontalStyle="{StaticResource Level200HorizontalStyle}" Level200HorizontalStyleCrossed="{StaticResource Level200HorizontalStyleCrossed}" Level200HorizontalStyleLeft="{StaticResource Level200HorizontalStyleLeft}" Level200HorizontalStyleRight="{StaticResource Level200HorizontalStyleRight}" HorizontalStyle="{StaticResource Level200HorizontalStyle}" />
                </scheduleView:RadScheduleView.AppointmentStyleSelector>
                <scheduleView:RadScheduleView.ViewDefinitions>
                    <scheduleView:TimelineViewDefinition VisibleDays="30" TimerulerGroupStringFormat="{}{0:dd ddd}" TimerulerMajorTickStringFormat="" Title="Monatsansicht - " LargeChangeInterval="31d"/>
                </scheduleView:RadScheduleView.ViewDefinitions>
                <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu Name="ContextMenu" IsOpen="{Binding IsContextMenuOpen, Source={StaticResource ContextMenueDataModel},Mode=TwoWay}" ScrollViewer.CanContentScroll="True">
                        <telerik:RadMenuItem Name="ContextMenuNew" Header="Neuer Termin" Command="{Binding NewCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedSlot, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/Neu.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem IsSeparator="True" />
                        <telerik:RadMenuItem Name="ContextMenuRead" Header="Termin lesen" Command="{Binding ReadCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/Lesen.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="ContextMenuEdit" Header="Termin bearbeiten" Command="{Binding EditCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/bearbeiten.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="ContextMenuDelete" Header="Termin löschen" Command="{Binding DeleteCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/loeschen.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem IsSeparator="True" />
                        <telerik:RadMenuItem Name="Group1" Header="Guppe 1">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="Group2" Header="Guppe 2">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="Group3" Header="Guppe 3">
                        </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                </telerik:RadContextMenu.ContextMenu>
            </scheduleView:RadScheduleView>

regards
rudi 


Rudolf
Top achievements
Rank 1
 answered on 12 Jan 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?