Telerik Forums
UI for WPF Forum
4 answers
299 views

Hi to all,

I'm creating new project with a Common Style Dictionary, and merged with application resource.

When I apply style to my control, this one disappers!

I tryed with RadWindow and Radbutton, same result.

 

I've attach several screeshots.

Can you help me to understand?

Martin
Telerik team
 answered on 09 Sep 2016
0 answers
133 views

Hi guys,

I have a application that spits out new lines in this Gridviewer. All the new lines are added at the bottom of the viewer. The "normal" behavior of the scrolling bar is that new lines will be added at the top. Since my new lines are added the bottom I have to revert the scrolling method. Does anyone know if this is possible? 

Timo
Top achievements
Rank 1
 asked on 09 Sep 2016
1 answer
590 views

The tag Application in App.xaml is in error, after apply new theme at project

I chose VisualStudio2013 theme, I click "Configure Project" on my project, chose controls and theme, after that, it appears strange error:

"Object reference not set to an instance of object" highlighting Application tag. Why?

 

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/System.Windows.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Chart.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.FixedDocumentViewers.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Input.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.ScheduleView.xaml" />
                <ResourceDictionary Source="Helpers/Themes/Telerik.ReportViewer.Wpf.xaml"/>
                <ResourceDictionary Source="Styles/CommonDictionary.xaml" />
                <ResourceDictionary Source="Styles/IconDictionary.xaml" />
                <ResourceDictionary Source="Styles/ToolBarDictionary.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

Martin
Telerik team
 answered on 09 Sep 2016
1 answer
278 views

Hi,

I have few tabs in TabControls. Application has ability to switch themes in runtime.

I need highlight some tabs due to some actions (e.g. new message received in the system and messages tab will be highlighted) in runtime. This might be blinking tab header but it should be in the current theme colors, for example if I set blue color for tab header - in some cases it will be ok, but if selected theme who has blue tabs by default - highlighted tab will be not visible. 

How this can be implemented using viewmodel property binding or something like this. Do you have any examples or article?

Thank you

Evgenia
Telerik team
 answered on 08 Sep 2016
1 answer
185 views

Hello,

We are currently using the radmap control to display a shape file (1MB) showing a map of the world.

The virtualization engine is also used in order to maximize the performance for this relatively large shape file.

It is used as follow (largely inspired by telerik examples):

 

<telerik:VisualizationLayer
MapShapeVisualizationCreated="VisualizationLayer_MapShapeVisualizationCreated"
MapShapeVisualizationRemoved="VisualizationLayer_MapShapeVisualizationRemoved"
AutoHighlightMapShape="False" >
<telerik:VisualizationLayer.VirtualizationSource>
 <telerik:MapShapeDataVirtualizationSource x:Name="VirtualisationSource" BusyIndicator="{Binding ElementName=busyIndicator}">
<telerik:MapShapeDataVirtualizationSource.Reader>
<telerik:AsyncShapeFileReader ReadShapeDataCompleted="AsyncShapeFileReader_ReadShapeDataCompleted"  />
</telerik:MapShapeDataVirtualizationSource.Reader>
</telerik:MapShapeDataVirtualizationSource>
</telerik:VisualizationLayer.VirtualizationSource>
<telerik:VisualizationLayer.ZoomLevelGridList>
<telerik:ZoomLevelGrid MinZoom="5" />
<telerik:ZoomLevelGrid MinZoom="6" />
<telerik:ZoomLevelGrid MinZoom="7" />
<telerik:ZoomLevelGrid MinZoom="8" />
<telerik:ZoomLevelGrid MinZoom="9" />
<telerik:ZoomLevelGrid MinZoom="10" />
<telerik:ZoomLevelGrid MinZoom="11" />
<telerik:ZoomLevelGrid MinZoom="12" />
</telerik:VisualizationLayer.ZoomLevelGridList>
<telerik:VisualizationLayer.ItemTemplate>
<DataTemplate>
<Rectangle Width="10"
Height="10"
telerik:MapLayer.Location="{Binding}"
Fill="Transparent"
MouseMove="Rectangle_MouseMove"
StrokeThickness="2" telerik:MapLayer.ZoomRange="5,12">
<!--<telerik:MapLayer.HotSpot>
<telerik:HotSpot X="0.5" Y="0.5" />
</telerik:MapLayer.HotSpot>-->
</Rectangle>
</DataTemplate>
</telerik:VisualizationLayer.ItemTemplate>
</telerik:VisualizationLayer>

 

A menu is displayed when the map is right clicked. It allows to add a start or a waypoint. A line is traced between the rectangles item

<telerik:RadMap.ContextMenu>
<ContextMenu>
<MenuItem Click="StartNewRouteMenuItem_Click" Header="Start new route" />
<MenuItem x:Name="AddWayPointMenuItem"
Click="AddWayPointMenuItem_Click"
 Header="Add way point"
IsEnabled="False" />
<MenuItem x:Name="EndRouteMenuItem"
   Click="EndRouteMenuItem_Click"
   Header="end route"
   IsEnabled="False" />
  <MenuItem x:Name="ResetMenuItem"
     Click="ResetMenuItem_Click"
 Header="Reset route"
 IsEnabled="True" />
     </ContextMenu>

Firts issue :

When the map is right clicked the menu is shown, but the shape file disappears.

Moving the map will correct this.

 

Second issue :

While zooming out the lines and the rectangle disappears , while the shape file is correctly displayed.

 

Here is apart of the code behind :

/// <summary>
 
        /// Handles the MouseRightButtonDown event of the WorldRadMap control.
 
        /// </summary>
 
        /// <param name="sender">The source of the event.</param>
 
        /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs" /> instance containing the event data.</param>
 
        private void WorldRadMap_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
 
        {
 
            previousMouseClickPos = lastMouseClickPos;
 
            lastMouseClickPos = e.GetPosition(WorldRadMap);
 
            Point1 = Point2;
 
            Point2 = Location.GetCoordinates(WorldRadMap, lastMouseClickPos);
 
        }
 
        
 
        /// <summary>
 
        /// Adds the point to map.
 
        /// </summary>
 
        /// <returns></returns>
 
        private bool AddPointToMap()
 
        {
 
            var location = Location.GetCoordinates(WorldRadMap, lastMouseClickPos);
 
            if (GribAPI_GTT.IsOnContinent(location.Longitude, location.Latitude))
 
            {
 
                MessageBox.Show("WayPoint must be in open sea");
 
                return false;
 
            }
 
            
 
            this.visualizationlayer.Items.Add(Location.GetCoordinates(WorldRadMap, lastMouseClickPos));
 
            return true;
 
        }
 
  
 
/// <summary>
 
        /// Draws the line.
 
        /// </summary>
 
        private void DrawLine()
 
        {
 
            LineData line = new LineData()
 
            {
 
                Point1 = Point1,
 
                Point2 = Point2,
 
                ShapeFill = new MapShapeFill()
 
                {
 
                    Stroke = new SolidColorBrush(Colors.Purple),
 
                    StrokeThickness = 2,
 
                }
 
            };
 
            
 
            this.visualizationlayer.Items.Add(line);
 
        }

 

 

Is there a way that the items and the shapefile keep displaying

Martin Ivanov
Telerik team
 answered on 08 Sep 2016
5 answers
257 views

Hi,

I'm trying to create a solution based off the "Dynamic Number of Series" sample in the RadChartView documentation.  My xaml looks like this:

<telerik:RadCartesianChart x:Name="chart">
     <telerik:RadCartesianChart.HorizontalAxis>
           <telerik:LinearAxis Minimum="{Binding XAxisMin}" Maximum="{Binding XAxisMax}">
                <telerik:LinearAxis.LabelStyle>
                     <Style TargetType="TextBlock">
                          <Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
                     </Style>
                </telerik:LinearAxis.LabelStyle>
           </telerik:LinearAxis>
      </telerik:RadCartesianChart.HorizontalAxis>
      <telerik:RadCartesianChart.VerticalAxis>
            <telerik:LinearAxis Minimum="{Binding YAxisMin}" Maximum="{Binding YAxisMax}">
                 <telerik:LinearAxis.LabelStyle>
                      <Style TargetType="TextBlock">
                           <Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
                       </Style>
                   </telerik:LinearAxis.LabelStyle>
               </telerik:LinearAxis>
           </telerik:RadCartesianChart.VerticalAxis>
           <telerik:RadCartesianChart.SeriesProvider>
               <telerik:ChartSeriesProvider Source="{Binding MyVMs}">
                   <telerik:ChartSeriesProvider.SeriesDescriptors>
                       <telerik:ScatterSeriesDescriptor ItemsSourcePath="PointVMs" XValuePath="XValue" YValuePath="YValue">
                           <telerik:ScatterSeriesDescriptor.Style>
                               <Style TargetType="telerik:ScatterPointSeries">
                                   <Setter Property="PointTemplate">
                                       <Setter.Value>
                                           <DataTemplate>
                                               <Ellipse Width="10" 
                                                        Height="10" 
                                                        Fill="{Binding Path=DataItem.HighlightColor, RelativeSource={RelativeSource AncestorType=telerik:ChartSeriesProvider}}" />                                                
                                           </DataTemplate>
                                       </Setter.Value>
                                   </Setter>
                               </Style>
                           </telerik:ScatterSeriesDescriptor.Style>
                       </telerik:ScatterSeriesDescriptor>
                   </telerik:ChartSeriesProvider.SeriesDescriptors>
               </telerik:ChartSeriesProvider>
           </telerik:RadCartesianChart.SeriesProvider>
</telerik:RadCartesianChart>

I can't seem to find the right combination to gain access to the MyVM.HighlightColor so I can set the Fill in my DataTemplate.  Is there a way to do this or is it a case of having to add the color over and over again inside each PointVM?

Thanks for an guidance,

Craig

Martin Ivanov
Telerik team
 answered on 08 Sep 2016
1 answer
162 views

I have a listBox related with RadTransitionControl , when i change selected item of the listBox , i want to change all the content in the RadTransitionControl 

(Inject an other userControl)

Kalin
Telerik team
 answered on 08 Sep 2016
3 answers
273 views

Hi,

How can I add a sumfunction to a GridViewExpression column?
for a GridViewDataColumn I simply add:

<telerik:GridViewDataColumn.AggregateFunctions>
            <telerik:SumFunction />
</telerik:GridViewDataColumn.AggregateFunctions>

and it works 100%, but when I do it for the same for GridViewExpressionColumn:

<telerik:GridViewExpressionColumn.AggregateFunctions>
            <telerik:SumFunction />
 </telerik:GridViewExpressionColumn.AggregateFunctions>

I get an error "No Generic method 'Sum' on type 'System.linq.Enumerable' is compatible with the supplied type arguments".
The data in GridViewDataColumns is of Type Decimal, do i need to set the type of the expression column? if so, how?

thanks.

regards,
Matthew

Dilyan Traykov
Telerik team
 answered on 07 Sep 2016
1 answer
214 views

Hello Telerik,

I'm using RadListBox with binding ItemsSource to CollectionViewSource and switched off IsSynchronizedWithCurrentItem...

And it's nessesary to give option select all within keyboard manipulation.

What can you suggest in this case?

 

With regards, Anatoliy

Nasko
Telerik team
 answered on 07 Sep 2016
8 answers
351 views

Hi, I create a diagrampane. When display in the docking, the Diagram shows fast, but the thumbnail shows after a few seconds. Perhaps the diagram has many  items, have some method for display the two synchronously? 

thanks

 

Main code:

RadDocumentPane diagramPane = new RadDocumentPane();

MyUserControl diagramUserControl = new MydiagramUserControl(diagram , true);

MyWindow.PaneGroup.Items.Add(diagramUserControl);

 

MydiagramUserControl code:

MydiagramUserControl(RadDiagram diagram, bool isNeedThumbnail){

    InitializeComponent();

    this.diagramPane.Children.Add(diagram);

    if(isNeedThumbnail){

        RadDiagramThumbnail diagramThumbnail = new RadDiagramThumbnail(){Diagram = diagram};

        diagramThumbnail.VerticalAlignment = VerticalAlignment.Bottom;

        diagramThumbnail.HorizontalAlignment = HorizontalAlignment.Left;

        diagramThumbnial.Width = 150;

        diagramThumbnail.Height = 100;

        this.diagramPane.Children.Add(diagramThumbnail);

    }

}

Jonathan
Top achievements
Rank 1
 answered on 07 Sep 2016
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?