Telerik Forums
UI for WPF Forum
4 answers
204 views
<DataTemplate x:Key="MultiComboBoxView">
   <telerik:RadComboBox ItemsSource="{Binding ValueEnum}"
                  Width="220" Height="30"
                  ItemTemplate="{StaticResource RadComboBoxItemTemplate}">
        <telerik:RadComboBox.SelectionBoxTemplate>
            <DataTemplate>
                 <TextBlock Text="{Binding SelectedItemsText}" />
            </DataTemplate>
        </telerik:RadComboBox.SelectionBoxTemplate>
    </telerik:RadComboBox>
</DataTemplate>

Hi,

My Combobox is not editable and does not have as source static items, but selectionBoxTemplate is ignored though.
I tried with hard coded string instead of a binding, but it's still been ignored.
What am I doing wrong?
Michel
Top achievements
Rank 1
 answered on 29 Jul 2014
1 answer
87 views
Hello, I would like to enquire on a solution to the scenario as per title. Below is what I have currently, which obviously doesn't work as the Drop is just 1 event itself. If I accept, everything will be accepted, and if I reject, everything will be rejected at once.

private void ListBoxIssue_OnPreviewDrop(object sender, DragEventArgs e)
{
    var droppedObject = DragDropPayloadManager.GetDataFromObject(e.Data, typeof(CommsItem));
    List<CommsItem> listCommsItem = ((List<object>) droppedObject).Cast<CommsItem>().ToList();
    //droppedObject is an object, which is of List<Object>, which the objects in the list are CommsItem
    foreach (CommsItem commsItem in listCommsItem)
    {
        if (commsItem.Serial == "2008")
        {
            e.Handled = true;
            e.Effects = DragDropEffects.None;
        }
        else
        {
            e.Handled = false;
            e.Effects = DragDropEffects.All;
        }
    }
}
Kalin
Telerik team
 answered on 29 Jul 2014
1 answer
185 views
Hello,

I need to split a single RadDocument across multiple pages of a report, thus multiple instances of a RadRichTextBox.  How do I paginate across pages and keep the formatting?  I have tried selecting the portion of the document that fits in one control and creating a new document from that selection, but I lose key elements of the formatting.  For instance, if I have a numbered list that crosses pages, the numbering starts over on the second page after I split it up.

Maybe there is a sample app available that would demonstrate what I am trying to do?

Thanks,

Peter
Petya
Telerik team
 answered on 29 Jul 2014
1 answer
149 views

Hi, 

The scenario is as follows:

The ViewModel exposes an ObservableCollection of ViewModels
The View has a RadTileList with AutoGenerateTiles=true and Wiring up the AutoGeneratingTile event to set the background color of the Tiles
The Tiles are created dynamically by using DataTemplates based on the type of the ViewModel of the collection of ViewModels exposed by the View's ViewModel
The TileType is bound as every VM in the exposed collection has this property as well.

<tiles:TscTileList x:Name="HomeTileList"
                             ItemsSource="{Binding TileListContentControls, Mode=OneWay}"
                             SelectedItem="{Binding SelectedTileListContentControl, Mode=TwoWay}"
                             ScrollViewer.HorizontalScrollBarVisibility="Auto"
                             AutoGenerateTile="True"
                             AutoGeneratingTile="HomeTileListAutoGeneratingTile">
             
            <tiles:TscTileList.Resources>
                 
                <DataTemplate DataType="{x:Type home:TileListTileContentControlViewModel}">
                    <tiles:TscTile Title="{Binding NavigationItem.Name}" Image="{Binding NavigationItem.Image}" TileType="{Binding TileType}" Style="{StaticResource SimpleTileStyle}"/>
                </DataTemplate>
                 
                <DataTemplate DataType="{x:Type home:AboutTargetWidgetTileListContentControlViewModel}">
                    <tiles:TscTile Title="{Binding NavigationItem.Name}" Image="{Binding NavigationItem.Image}" TileType="{Binding TileType}" Style="{StaticResource AboutTheTargetWidgetStyle}"/>
                </DataTemplate>
                 
            </tiles:TscTileList.Resources>
             
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="SelectionChanged">
                    <command:EventToCommand Command="{Binding TileSelectedCommand}"
                                            CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </tiles:TscTileList>

According to my understanding, as the TileType is bound and is not being set anywhere else (niether in the AutoGeneratingTile event nor in the styles) each of the dynamically created Tiles should stick to the programatically (via XAML) assigned value.

I extended (with empty content, just to understand) the RadTileList and the Tile to be able to see the order of the execution and it happens as follows in the Dynamic scenario:
- Extended RadTileList's AutoGeneratingTile event happens first. It does not matter what is specified in XAML the e.Tile.TileType is always double (I guess because it is the default value of the enum)
-View's AutoGeneratingTile follows with the same behavior

The two above happen in an alternat manner: one then the other until all tiles are "rendered".
- Then, the Extended Tile constructor is fired (for all of them) and the this.Base.TileType property is correctly set here, but as, it was already painted with the value (enum default) found in the AutogeneratingTile events... there is no way to get rid of it and get it work properly unelss using reflection in the AutoGeneratingTile event and manually assingning it.

Is there anyway to make RadTileList repect the value of the TileType in the DataTemplate when doing it dynamically? (it happens the same when the value is explicited in the DataTemplate instead of binding it).

Thanks in advance


Yoan
Telerik team
 answered on 29 Jul 2014
7 answers
83 views
Hello, guys,

The following problem exists:
When you move to the bottom of the grid, and start scrolling up, items are loaded in small portions (3, 5, 20 items), doesn't matter what size of virtual page is set.


Regards,
Yuliya
Dimitrina
Telerik team
 answered on 29 Jul 2014
4 answers
183 views
On the RadCalendar, how do I get the dates that are visible to the user? 

I have tried the DisplayDateChanged event, and it does fire, but I can´t figure out what dates are visible.

Thanks
Kalin
Telerik team
 answered on 29 Jul 2014
6 answers
304 views
I'm calling the following method on my diagram after I've programmatically added the items:

            myDiagram.LayoutAsync(settings: new SugiyamaSettings {
                LayoutContainerChildren = true,
                Orientation = Telerik.Windows.Diagrams.Core.Orientation.Vertical
            });

However, I have several containers, and I'd like the items inside them to be oriented horizontally. How can I achieve this?
Edgars
Top achievements
Rank 1
 answered on 29 Jul 2014
1 answer
104 views
I'm using the rad cartesian chart control to display multiple lineseries. This is working fine. The problem is for some charts the y-axis value is very large eg: 2500000. These values are shortened to 25E+06. How can I display the entire value?
The other problem is I'm creating a datatemplate for Labels, but multiple labels are displayed for a single datapoint. The code i'm using is -

                    TextBlock t = new TextBlock();
                    t.Text = val.ToString();
                    t.Foreground = Brushes.White;
                    t.Background = brush;

                    DataTemplate d = new DataTemplate();
                    d.DataType = typeof(TextBlock);
                    FrameworkElementFactory spf = new FrameworkElementFactory(typeof(TextBlock));
                    spf.SetValue(TextBlock.TextProperty, Convert.ToInt32(val).ToString());
                    spf.SetValue(TextBlock.ForegroundProperty, brush);
                    d.VisualTree = spf;
                    ChartSeriesLabelDefinition cld = new ChartSeriesLabelDefinition();
                    cld.Template = d;
                    lineseries.LabelDefinitions.Add(cld);

I'm not doing this in xaml because the number of lineseries is obtained dynamically. I've also attached a snapshot.
Petar Marchev
Telerik team
 answered on 29 Jul 2014
1 answer
70 views
Hi,

I'm building a chart using the RadCartesianChart control, and using a custom ChartPalette. I have five PaletteEntries specified in the palette, and I want them to be used in a particular order (first plot on the chart uses first color, second plot uses second color, etc) but it seems to be choosing the same two colors (there are only two plots for now) no matter how I order their decelerations in xaml. Is there a way to specify the order in which palette entries are sampled?

Thanks
Petar Marchev
Telerik team
 answered on 29 Jul 2014
1 answer
112 views
Hi, I found that underscore symbols included in a pane header are not displayed in the document host pane header.
Also, I use RibbonView's Backstage menu and its Recent files menu, and if the recent file names have underscore symbols, they are not properly displayed either (RadRibbonButton item).
Please help!
Kalin
Telerik team
 answered on 29 Jul 2014
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?