Telerik Forums
UI for WPF Forum
1 answer
119 views

From the examples I can load a KML file to an informationlayer like this:


Dim streamResource As StreamResourceInfo = Application.GetResourceStream(New Uri("/MyApp;component/Resources/bulgaria.kml", UriKind.RelativeOrAbsolute))
Dim elements As List(Of FrameworkElement) = KmlReader.Read(streamResource.Stream)
 
For Each element As FrameworkElement In elements
    Me.informationLayer.Items.Add(element)
Next element


... however in your Bulgaria.kml example I notice this:



<Icon>

<href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png</href>

</Icon>


... how can I change it so that placemark_circle.png is local, and does not require google?  When I copy the .png file to a local location, no value for the icon href works for adding to the information layer.  Do you have any suggestions?



Andrey
Telerik team
 answered on 03 Dec 2013
2 answers
118 views
Hi everyone,
I have a console application and I want to export a RadChart to image, I found this thread and I did as mentioned in the solution, the problem is that when I have over 50 input, the exported image appears very poorly.
In your example you put 4 values per serie
var itemsSource = new List<double>[] { new List<double> { 9, 2, 3, 4 }, new List<double> { 5, 7, 3, 4 } };
if you try with 100 values per serie you can notice that the exported image does not display correctly.
I think that the issue is from the width of the rectangle in ExportStyle.
Yavor
Telerik team
 answered on 03 Dec 2013
1 answer
187 views
Hello,

I have a window where I need to show 6 charts and that window can change its size, as the window gets smaller, the labels on the horizontal axis start disappearing as you can see in the attached image.

This is the a sample code:
<Window
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="TestWPF2.MainWindow"
        Title="MainWindow" Height="443.5" Width="890.5" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
 
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />           
        </Grid.ColumnDefinitions>
         
        <telerik:RadCartesianChart Margin="0,0,0,0" Grid.Row="0">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:BarSeries>
                <telerik:BarSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/>
                </telerik:BarSeries.DataPoints>
            </telerik:BarSeries>
        </telerik:RadCartesianChart>
 
        <telerik:RadCartesianChart Margin="0" Grid.Column="1" Grid.Row="0">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:BarSeries>
                <telerik:BarSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/>
                </telerik:BarSeries.DataPoints>
            </telerik:BarSeries>
        </telerik:RadCartesianChart>
 
        <telerik:RadCartesianChart Margin="0" Grid.Row="1">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:BarSeries>
                <telerik:BarSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/>
                </telerik:BarSeries.DataPoints>
            </telerik:BarSeries>
        </telerik:RadCartesianChart>
 
        <telerik:RadCartesianChart Margin="0" Grid.Column="1" Grid.Row="1">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:BarSeries>
                <telerik:BarSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/>
                </telerik:BarSeries.DataPoints>
            </telerik:BarSeries>
        </telerik:RadCartesianChart>
 
        <telerik:RadCartesianChart Margin="0" Grid.Row="2">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:BarSeries>
                <telerik:BarSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/>
                </telerik:BarSeries.DataPoints>
            </telerik:BarSeries>
        </telerik:RadCartesianChart>
 
        <telerik:RadCartesianChart Margin="0" Grid.Column="1" Grid.Row="2">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:BarSeries>
                <telerik:BarSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/>
                </telerik:BarSeries.DataPoints>
            </telerik:BarSeries>
        </telerik:RadCartesianChart>
 
        <telerik:RadCartesianChart Margin="0" Grid.Row="3">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:BarSeries>
                <telerik:BarSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/>
                </telerik:BarSeries.DataPoints>
            </telerik:BarSeries>
        </telerik:RadCartesianChart>
 
        <telerik:RadCartesianChart Margin="0" Grid.Column="1" Grid.Row="3">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:BarSeries>
                <telerik:BarSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/>
                    <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/>
                </telerik:BarSeries.DataPoints>
            </telerik:BarSeries>
        </telerik:RadCartesianChart>
         
         
    </Grid>
</Window>

Is there a way to avoid this behavior?

Maybe make smaller the bars instead of disappearing the labels.

Thanks in advance,

Alberto




Petar Marchev
Telerik team
 answered on 03 Dec 2013
3 answers
143 views
How can I hide all axis labels and ticks and still have the zoom bar showing?

Setting the axis visibility hides both, setting labels and and tick colors to transparent still incurs a perf penalty.
Petar Marchev
Telerik team
 answered on 02 Dec 2013
1 answer
155 views
Hi,

I would like to make window.prompt to required or at least if no input is entered it remains open. I don't want to open another prompt over this. 

Please let me know if anyone can help me.

Thanks
Kalin
Telerik team
 answered on 02 Dec 2013
3 answers
346 views
Hello,

I’ve started my RadControl a few days ago and I’am delighted by the number feature and mature design of the components.
However I've also just started with WPF UI Development, so my learning curve is still steep and maybe you can help me with a Data Binding problem/misunderstanding of mine:
I've got a RadGridView (inside a Data Template) in an MVVM Application, and I’m trying to bind an Observable Collection to a GridViewData Column. Please take a look at my following Models and View-Models (I’ve stripped out unnecessary code):

//Part of the ViewModel - Begin
private ObservableCollection<ProductCategoryModel> _planCollection = null;
public ViewModel()
{
    //ViewModel Constructor
    _planCollection = new ObservableCollection<ProductCategoryModel>
                {
                    new ProductCategoryModel("AlphaPlan"),
                    new ProductCategoryModel("BetaPlan")
                }
}
public ObservableCollection<ProductCategoryModel> PlanCollection
{
    get { return _planCollection; }
    set { _planCollection = value; }
}
public ObservableCollection<CalendarWeek> AlphaPlan
{
    get { return _planCollection[0].Numbers; }
    set { throw new NotImplementedException(); }
}
public ObservableCollection<CalendarWeek> BetaPlan
{
    get { return _planCollection[1].Numbers; }
    set { throw new NotImplementedException(); }
}
//Part of the ViewModel - End
 
//The Models - Begin
public class CalendarWeek : INotifyPropertyChanged
    {
        public CalendarWeek(int week, float value)
        {
            this.Week = week;
            this.Value = value;
        }
 
        [Display(AutoGenerateField = false)]
        public int Week { get; set; }
 
        [DisplayAttribute(Name = "Value")]
        public double Value { get; set; }
    }
 
public class ProductCategoryModel
    {
        public ProductCategoryModel(string leName)
        {
            this.Product = leName;
            this.Numbers = new ObservableCollection<CalendarWeek>();
 
            for (int i = 1; i <= 52; i++)
            {
                Random r = new Random(Guid.NewGuid().GetHashCode());
                int rInt = r.Next(0, 100);
                this.Numbers.Add(new CalendarWeek(i, rInt));
            }
        }
 
        public ObservableCollection<CalendarWeek> Numbers { get; set; }
        public string Product { get; set; }
    }
//The Models - End


I want to put these Collections in one RadGridView (as you can see, I just want the Values member from the CalendarWeek in the Column).
I have tried many approaches I have stumbled across the RadControl Help, Forums or on StackOverflow, but none seems too work (or I missed the right combination) for me.

What are your preferred approach here?

Hierarchical? Master Detail Binding? Creating my own GridViewDataColumn Template/Style?

Thanks a lot and happy Holidays for all of you :)
Julien
Dimitrina
Telerik team
 answered on 02 Dec 2013
1 answer
335 views
Hi Team,
I want a multi column combobox, for this i create a combobox and define gridview as RadcomboboxItem. It works fine, but I am unable to filter gridview. I want a multicolumn combobox, which can filter columns. I RadGridView1_SelectionChanged event to set selected value.
 Your Quick response will be highly appreciated.

Following is Xmal Code:

<telerik:RadComboBox Name="rcbNew" Grid.Row="0"

                          IsEditable="True" Height="25" Width="200">

            <telerik:RadComboBox.Items>

                <telerik:RadComboBoxItem>

                    <telerik:RadComboBoxItem.Template>

                        <ControlTemplate>

                            <my1:RadGridView x:Name="RadGridView1" ShowGroupPanel="False" CanUserFreezeColumns="False"

                                             RowIndicatorVisibility="Collapsed" IsReadOnly="True"

                                             IsFilteringAllowed="False" ItemsSource="{Binding .}"

                                             Width="200" Height="150" SelectionChanged="RadGridView1_SelectionChanged" >

                            </my1:RadGridView>

                        </ControlTemplate>

                    </telerik:RadComboBoxItem.Template>

                </telerik:RadComboBoxItem>

            </telerik:RadComboBox.Items>

        </telerik:RadComboBox>




Here follwoing code:

     

DependencyProperty currentSelectedValue = DependencyProperty.Register("rcbNewSelectedValue", typeof(Int32), typeof(Int32));
        // Constructor
public GridinDropDown()

        {

            InitializeComponent();

            IList<Company> MyObject;

 

            MyObject = new List<Company>()

            {

                new Company { Id=1, Name="Description1" },

                new Company { Id=2, Name="Description2" },

                new Company { Id=3, Name="Description3" },

                new Company { Id=4, Name="Description4" }

            };

 

            this.DataContext = MyObject;

        }

private void RadGridView1_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)

        {

            rcbNew.Text = ((Company)((Telerik.Windows.Controls.GridView.GridViewDataControl)sender).SelectedItem).Name;

            rcbNew.SetValue(currentSelectedValue, ((Company)((Telerik.Windows.Controls.GridView.GridViewDataControl)sender).SelectedItem).Id);// = ((Company)((Telerik.Windows.Controls.GridView.GridViewDataControl)sender).SelectedItem).Id;

            rcbNew.IsDropDownOpen = false;

        }


      

 

  

Azar
Top achievements
Rank 1
 answered on 02 Dec 2013
3 answers
111 views
Hello!

According to demo WPF->GridView->Appearance->Data Formatting I can set DataTemplate as CellTemplate.

Everything works fine. But what should I do if I want my DataTemplate fill cell?

For example, this code will show me empty cell:

              <telerik:GridViewDataColumn.CellTemplate>
                    <DataTemplate>
                        <Grid Background="DarkMagenta"/>
                    </DataTemplate>
              </telerik:GridViewDataColumn.CellTemplate>

instead of filling all empty space.
Yoan
Telerik team
 answered on 29 Nov 2013
1 answer
69 views
Hi Telerik,
I want to set tileview togglebutton icon smaller,how can i set it?
how can i replace the toggle button icon?
tileview default style code,could you give me ?
Pavel R. Pavlov
Telerik team
 answered on 29 Nov 2013
1 answer
162 views
Hello,
I currently group data as follow:

<telerik:RadScheduleView.ViewDefinitions>

<telerik:DayViewDefinition Title="{res:Res Static=loc:ResourceIntervention.DayPlanning, Default='Jour!'}"/>

<telerik:WeekViewDefinition Title="{res:Res Static=loc:ResourceIntervention.WeekPlanning, Default='Semaine!'}"/>

<telerik:MonthViewDefinition Title="{res:Res Static=loc:ResourceIntervention.MonthPlanning, Default='Mois!'}"/>

</telerik:RadScheduleView.ViewDefinitions>

<telerik:RadScheduleView.GroupDescriptionsSource>

     <telerik:GroupDescriptionCollection>

         <telerik:DateGroupDescription />

         <telerik:ResourceGroupDescription ResourceType="Technicians" />

     </telerik:GroupDescriptionCollection>

</telerik:RadScheduleView.GroupDescriptionsSource>

I would like to group data by "date" and"Technicians" only in the day view definition.
In the week view definition, I would like to group by "Date" only.
Is it possible?

Kind regards,
Sebastien

Kalin
Telerik team
 answered on 29 Nov 2013
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?