Telerik Forums
UI for WPF Forum
6 answers
284 views

Sometimes the Pie section is too small to see the Percentage value so is it possible in this case show the values outer of the circular like in this picture.

Martin Ivanov
Telerik team
 answered on 28 Jul 2015
1 answer
117 views

Hi,

 

I would like to if it's possible to access or to know how many items is present in the history???

 

Thank's

Alain

Tanya
Telerik team
 answered on 28 Jul 2015
6 answers
493 views

Please my PieChart in the attach file.

This is my collection:

Dictionary<string, double> seriesSource = new Dictionary<string, double>();

    this.doughnutSries.ValueBinding = new GenericDataPointBinding<KeyValuePair<string, double>, double>()
    {
        ValueSelector = x => x.Value
    };
 
    this.doughnutSries.ItemsSource = seriesSource;
    this.doughnutSries.Loaded += doughnutSries_Loaded;
 
void doughnutSries_Loaded(object sender, RoutedEventArgs e)
{
    if (this.doughnutSries.DataPoints.Count > 0)
    {
        this.doughnutSries.DataPoints[0].IsSelected = true;
    }
}

 

 

XAML:

<telerik:RadPieChart Palette="Windows8">
    <telerik:RadPieChart.Behaviors>
        <telerik:ChartSelectionBehavior />
        <telerik:ChartTooltipBehavior />
    </telerik:RadPieChart.Behaviors>
 
    <telerik:DoughnutSeries x:Name="doughnutSries" InnerRadiusFactor="0.25" SelectedPointOffset="0.07">
        <telerik:DoughnutSeries.TooltipTemplate>
            <DataTemplate>
                <Border Background="#B1E154" CornerRadius="3" TextElement.Foreground="#FFFFFF" Padding="5">
                    <StackPanel>
                        <TextBlock>
                            <TextBlock Text="IP Address: " />
                            <TextBlock Text="{Binding DataItem.Key}" />                                   
                        </TextBlock>
                        <TextBlock>
                            <TextBlock Text="Value: " />
                            <TextBlock Text="{Binding Value}" />                                   
                        </TextBlock>
                    </StackPanel>
                </Border>
            </DataTemplate>
        </telerik:DoughnutSeries.TooltipTemplate>
    </telerik:DoughnutSeries>
</telerik:RadPieChart>

 So i want to add:

 1. Legend that will show me the IP Address and when mouse over i want also to highlight the pie section:

Please see this: http://docs.telerik.com/devtools/wpf/controls/radchart/features/chart-legend

2 I want to be able to copy the IP Address with mouse right click. 

Martin Ivanov
Telerik team
 answered on 28 Jul 2015
1 answer
163 views

<telerik:RadComboBox Name="Sample" DisplayMemberPath="Text" CanAutocompleteSelectItems="True" IsFilteringEnabled="True" HorizontalAlignment="Left" IsEditable="True" OpenDropDownOnFocus="True" VerticalAlignment="Top" Width="250">

When you enter text to filter the results the scroll bar acts very strangely. As you move it down it shrinks then finally re-expands as you scroll

Included a sample app that demonstrates this

http://screencast.com/t/GJXNhxEGGy3 and screen cast to demo it

https://dl.dropboxusercontent.com/u/6295901/WpfApplication3_2015-07-27%2014-36-51Z.zip Included Sample

Created using UI for WPF Q2 2015

 

Nasko
Telerik team
 answered on 28 Jul 2015
2 answers
67 views

Hi,

I use the autocompletebox, which have a list of country as ItemsSource. From this autocompletebox, I would have the possibility to add a new country, which is not in the current list. To do that, I want to have a custom item in the filtered list, which do something special and is selectable as an other item of the list.

I have the idea to add a special item in the ItemsSource and change the template of this special item with a TemplateSelector, but I would like to know if it exists a best way to do that?

I have attached a picture to illustrate what I would like to do.

Thanks for your help!

Alex

Alexandre
Top achievements
Rank 1
 answered on 28 Jul 2015
1 answer
470 views

Hi, I am trying to use a RadDropDownButton inside a RadToolBar control.

 

I need to display an image on the RadDropDownButton, the same way I can with a regular button like the example below:

 

<Button Name="btn_ONLINE">
                <StackPanel Orientation="Horizontal">
                    <Image Source="/Images/OnLine2Red24.png" />
                    <TextBlock Text="Offline" Margin="5,0,0,0" />
                </StackPanel>

</Button>

 

Is there any way I can achieve the same result?

 

Thanks,

 

Sia
Telerik team
 answered on 28 Jul 2015
2 answers
386 views

Hi, I have three horizontaly tiled RadSplitContainers inside another RadSplitContainer and I want to set the width of each one in percentage terms for the space available.

For example:

RadSplitContainer1 width should be 2/10 of available horizontal space

RadSplitContainer2 width should be 5/10 of available horizontal space

RadSplitContainer3 width should be 3/10 of available horizontal space

 

I am a bit confused with the documentation on how to achieve this. Anyone to kindly suggest a practical example?

 

Regards,

 

George

Nasko
Telerik team
 answered on 27 Jul 2015
7 answers
334 views

I have the following XAML.

<telerik:RadDocking>
    <telerik:RadPaneGroup>
        <telerik:RadPane Header=”Pane1” />
        <telerik:RadPane Header=”Pane2” />
    </telerik:RadPaneGroup>
</telerik:RadDocking>

Both Pane1 and Pane2 are docked by default and contained within the same pane group so at startup I see two tabs at the bottom and one pin/unpin button at the top. When I click the unpin button at the top I would expect the whole pane group (and thus all its RadPanes) to become undocked and slide to the left but I only see one slide to the left and the other remains open and pined.

This does not seem to be the normal behavior for a dock control, like the one used in Visual Studio itself. Is there a way to configure the Telerik dock control to behave like the dock control used by Visual Studio where when a pane group unpinned it unpins all its sub panes?

Kalin
Telerik team
 answered on 27 Jul 2015
3 answers
330 views

Hi,

I'm trying to create a generic combo box to select one of out business objects. I will try to show ou the scope:

Control (lets call it like this) GenericCombobox<Person>:
- Automatically loads items source from db when loaded (this is done asynchronously)

- the itemsssource is VirtualQueryableCollectionView created upon Telerik's Data Access query similar to db.GetAll<People>();

- Has one consistent template

- Allows to bind to SelectedItem

The intention is to create one consistent Selector for most of our BO - like Person, Customer, Order, Country just by creating inherited controls like CustomerCombobox : GenericCombobox<Customer> and putting in in xaml without having to manage itemssources.

 

I have few problems - combobox is loading all items from VirtualQueryableCollectionView - for our orders collection this is over 150k items. And since we will have for example 5 comboboxes on one view memory usage of application is running very very high.

 

Is there any way, to dynamically load items source - for example only show first 100 results matching search text? I tried to do something similar but I run into issues, because in most cases our currently selected item is not in these 100 first results. And when selected item is not in itemssource - we're losing selection.

 Cheers

Georgi
Telerik team
 answered on 27 Jul 2015
10 answers
112 views

I've started modifying the Database SDK example to support resources that are not in MSSQL so that we can continue to use our external resources that are in different database formats until we can migrate our entire application.

I've gotten it to load and save the data appropriately to the new AppointmentExternalResources link table, however when I edit an appointment and click save it thinks there are duplicate resources in the this.Resources of the SqlAppointment and then gives an error when saving the ScheduleViewRepository.Context.

I've made the following changes:

  • SqlResourceTypes - Added ExternalResource (bit)
  • New table SqlAppointmentExternalResources
    • SqlAppointments_SqlAppointmentId (int)
    • SqlResourceTypes_SqlResourceTypeId (int)
    • ResourceName (nvarchar(100)) - Used for the key value of the external database

Code wise:

    public partial class SqlAppointmentExternalResource
    {
        #region Constants and Variables
        short bStat = 0;
        SqlExternalResource externalResource;
        #endregion
 
        #region Properties
        public SqlExternalResource ExternalResource
        {
            get
            {
                if (externalResource == null && !string.IsNullOrEmpty(this.ResourceName))
                {
                    externalResource = new SqlExternalResource();
                    externalResource.ResourceTypeId = this.SqlResourceTypes_SqlResourceTypeId;
                    switch (this.SqlResourceTypes_SqlResourceTypeId)
                    {
                        case 2:
//load from external database
                                externalResource.ResourceName = "XXX";
                                externalResource.DisplayName = "DISPLAY_NAME";
                            break;
                        case 4:
//load from external database
                                externalResource.ResourceName = "ADMIN";
                                externalResource.DisplayName = "ADMINISTRATION";
                            break;
                    }
                }
                return externalResource;
            }
            set
            {
                externalResource = value;
                this.OnPropertyChanged("ExternalResource");
            }
        }
        #endregion
    }

  • SqlAppointment was changed as follows:
    public IList Resources
    {
        get
        {
            if (this.resources == null)
            {
                this.resources = new List<object>();
                foreach (var item in this.SqlAppointmentExternalResources.ToList())
                    this.resources.Add(item.ExternalResource);
                foreach (var item in this.SqlAppointmentResources.Select(ar => ar.SqlResource).ToList())
                    this.resources.Add((IResource)item);
            }
            return this.resources;
        }
    }
    void IEditableObject.EndEdit()
    {
        #region Standard Telerik Appointment Resources
        var temp = this.SqlAppointmentResources.ToList();
        var resources = this.Resources.OfType<SqlResource>().ToList();
     
        foreach (var item in temp)
            ScheduleViewRepository.Context.SqlAppointmentResources.DeleteObject(item);
     
        foreach (var sqlResource in resources)
            ScheduleViewRepository.Context.AddToSqlAppointmentResources(new SqlAppointmentResource { SqlAppointment = this, SqlResources_SqlResourceId = sqlResource.SqlResourceId });
        #endregion
     
        #region External Appointment Resources
        var temp1 = this.SqlAppointmentExternalResources.ToList();
        var externalResources = this.Resources.OfType<SqlExternalResource>().ToList();
     
        foreach (var item in temp1)
        {
            ScheduleViewRepository.Context.SqlAppointmentExternalResources.DeleteObject(item);
        }
     
        foreach (var sqlResource in externalResources)
        {
            ScheduleViewRepository.Context.AddToSqlAppointmentExternalResources(new SqlAppointmentExternalResource { SqlAppointment = this, SqlResourceTypes_SqlResourceTypeId = sqlResource.ResourceTypeId, ResourceName = sqlResource.ResourceName });
        }
        #endregion
     
        var removedExceptionAppointments = this.exceptionAppointments.Except(this.SqlExceptionOccurrences.Select(o => o.Appointment).OfType<SqlExceptionAppointment>());
        foreach (var exceptionAppointment in removedExceptionAppointments)
        {
            var excResources = exceptionAppointment.SqlExceptionResources.ToList();
            foreach (var item in excResources)
                ScheduleViewRepository.Context.SqlExceptionResources.DeleteObject(item);
        }
        ScheduleViewRepository.Context.SaveChanges();
    }
  • So in the EndEdit function it has 4 resources in this.Resource and 2 are duplicates of the original 2. I'm not sure where these duplicates are coming from.  Any ideas or help would be greatly appreciated!
Nasko
Telerik team
 answered on 27 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?