Telerik Forums
UI for WPF Forum
1 answer
214 views
Hi I am trying to use a custom style for deleting appointments. I am using the following for my template
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView,Version=2012.3.1129.40,Culture=neutral,PublicKeyToken=5803cfa389c90ce7"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    >
    <SolidColorBrush x:Key="RadScheduleForeground" Color="#FF000000" />
     
    <!-- DeleteAppointmentConfirmStyle-->
    <ControlTemplate x:Key="DeleteAppointmentConfirmTemplate" TargetType="local:SchedulerDialog">
        <StackPanel>
            <Grid>
                <Image Margin="15" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None" Source="/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/del_big.png" />
                <TextBlock Margin="85 15 15 15" TextWrapping="Wrap" VerticalAlignment="Center" Text="Are you sure you want to delete the selected cue?" />
            </Grid>
            <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok"
                    Command="{x:Static telerik:WindowCommands.Confirm}"
                    telerik:RadWindow.ResponseButton="Accept" />
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel"
                                    
                        telerik:RadWindow.ResponseButton="Cancel"
                         IsCancel="true" Command="{x:Static telerik:WindowCommands.Cancel}"
                         />
            </StackPanel>
        </StackPanel>
    </ControlTemplate>
    <Style x:Key="DeleteEventConfirmDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="300" />
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="DeleteItem" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource DeleteAppointmentConfirmTemplate}" />
    </Style>
</ResourceDictionary>

 If I comment out the delete icon image the code works fine. What is the proper reference for accessing that image?
Vladi
Telerik team
 answered on 29 Mar 2013
3 answers
236 views
Hi!
I'm using a RichTextBox with an HtmlDataProvider. When the end user writes this "aaaaaaaa" in the editor the return value of the HtmlDataProvider returns the following huge text when I would expect to get this:
aaaaaaaa 
or perhaps this
<p>aaaaaaaa</p>

How can I change this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
p { margin-top: 0px;margin-bottom: 12px;line-height: 1.15;text-align: left; }
body { font-family: 'Segoe UI';font-style: Normal;font-weight: normal;font-size: 12px; }
.TableNormal { telerik-style-type: table;telerik-style-name: TableNormal; }
.TableGrid { telerik-style-type: table;telerik-style-name: TableGrid;telerik-based-style-name: TableNormal;margin-bottom: 0px;line-height: 1; }
.Normal { telerik-style-type: paragraph;telerik-style-name: Normal; }
.Heading1 { telerik-style-type: paragraph;telerik-style-name: Heading1;telerik-based-style-name: Normal;telerik-linked-style-name: Heading1Char;font-weight: bold;font-size: 18.6666660308838px;color: #4F81BD;margin-top: 32px;margin-bottom: 0px; }
.Heading1Char { telerik-style-type: character;telerik-style-name: Heading1Char;telerik-linked-style-name: Heading1;font-weight: bold;font-size: 18.6666660308838px;color: #4F81BD;margin-top: 32px;margin-bottom: 0px; }
.Heading2 { telerik-style-type: paragraph;telerik-style-name: Heading2;telerik-based-style-name: Normal;telerik-linked-style-name: Heading2Char;font-weight: bold;font-size: 17.3333339691162px;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading2Char { telerik-style-type: character;telerik-style-name: Heading2Char;telerik-linked-style-name: Heading2;font-weight: bold;font-size: 17.3333339691162px;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading3 { telerik-style-type: paragraph;telerik-style-name: Heading3;telerik-based-style-name: Normal;telerik-linked-style-name: Heading3Char;font-weight: bold;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading3Char { telerik-style-type: character;telerik-style-name: Heading3Char;telerik-linked-style-name: Heading3;font-weight: bold;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading4 { telerik-style-type: paragraph;telerik-style-name: Heading4;telerik-based-style-name: Normal;telerik-linked-style-name: Heading4Char;font-style: Italic;font-weight: bold;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading4Char { telerik-style-type: character;telerik-style-name: Heading4Char;telerik-linked-style-name: Heading4;font-style: Italic;font-weight: bold;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading5 { telerik-style-type: paragraph;telerik-style-name: Heading5;telerik-based-style-name: Normal;telerik-linked-style-name: Heading5Char;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading5Char { telerik-style-type: character;telerik-style-name: Heading5Char;telerik-linked-style-name: Heading5;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading6 { telerik-style-type: paragraph;telerik-style-name: Heading6;telerik-based-style-name: Normal;telerik-linked-style-name: Heading6Char;font-style: Italic;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading6Char { telerik-style-type: character;telerik-style-name: Heading6Char;telerik-linked-style-name: Heading6;font-style: Italic;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading7 { telerik-style-type: paragraph;telerik-style-name: Heading7;telerik-based-style-name: Normal;telerik-linked-style-name: Heading7Char;font-style: Italic;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading7Char { telerik-style-type: character;telerik-style-name: Heading7Char;telerik-linked-style-name: Heading7;font-style: Italic;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading8 { telerik-style-type: paragraph;telerik-style-name: Heading8;telerik-based-style-name: Normal;telerik-linked-style-name: Heading8Char;font-size: 13.3333330154419px;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading8Char { telerik-style-type: character;telerik-style-name: Heading8Char;telerik-linked-style-name: Heading8;font-size: 13.3333330154419px;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading9 { telerik-style-type: paragraph;telerik-style-name: Heading9;telerik-based-style-name: Normal;telerik-linked-style-name: Heading9Char;font-style: Italic;font-size: 13.3333330154419px;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading9Char { telerik-style-type: character;telerik-style-name: Heading9Char;telerik-linked-style-name: Heading9;font-style: Italic;font-size: 13.3333330154419px;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Caption { telerik-style-type: paragraph;telerik-style-name: Caption;telerik-based-style-name: Normal;font-family: 'Calibri';font-weight: bold;font-size: 12px;color: #4F81BD;line-height: 1; }
.TOC1 { telerik-style-type: paragraph;telerik-style-name: TOC1;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px; }
.TOC2 { telerik-style-type: paragraph;telerik-style-name: TOC2;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 14.6666669845581px; }
.TOC3 { telerik-style-type: paragraph;telerik-style-name: TOC3;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 29.3333339691162px; }
.TOC4 { telerik-style-type: paragraph;telerik-style-name: TOC4;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 44.0000009536743px; }
.TOC5 { telerik-style-type: paragraph;telerik-style-name: TOC5;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 58.6666679382324px; }
.TOC6 { telerik-style-type: paragraph;telerik-style-name: TOC6;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 73.3333349227905px; }
.TOC7 { telerik-style-type: paragraph;telerik-style-name: TOC7;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 88.0000019073486px; }
.TOC8 { telerik-style-type: paragraph;telerik-style-name: TOC8;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 102.666668891907px; }
.TOC9 { telerik-style-type: paragraph;telerik-style-name: TOC9;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 117.333335876465px; }
.TableofFigures { telerik-style-type: paragraph;telerik-style-name: TableofFigures;telerik-based-style-name: Normal;margin-bottom: 0px; }
.Hyperlink { telerik-style-type: character;telerik-style-name: Hyperlink;color: #0000FF;text-decoration: underline; }
.p_DEC438A7 { telerik-style-type: local; }
.s_DEC438A7 { telerik-style-type: local; }
</style></head><body><p class="Normal p_DEC438A7"><span class="s_DEC438A7">aaaaaaaa</span></p></body></html>


Mihail
Telerik team
 answered on 29 Mar 2013
1 answer
190 views
Hi!

I use the StyleManager (with the Theme "Office_Silver") and I need to change the color or brush when the mouse is over on scrollbar and column header
Is it necessary to redefine all templates juste for change this?

Thanks
Yoan
Telerik team
 answered on 29 Mar 2013
5 answers
208 views
I would like to hide default values for CLR types without making them nullable.

I have properties like Top, Left and the default value for int is 0, but I don't want to show zero, just values set by the user or by me in code.
Ivan Ivanov
Telerik team
 answered on 29 Mar 2013
5 answers
656 views
I'm trying to figure out the best way to implement this with the RadGridView. I have a WCF service with a client callback. I invoke the service to begin a query, and it invokes the callback multiple times as results are known. It has to be this way, because the results come streaming in, must begin to appear quickly, and I have no idea how many results there will be up front.

Right now I'm implementing this completely in a ViewModel: exposing the set of results as an ObservableCollection which is being added to as results arrive. I also have various mechanisms in place to cancel outstanding queries, and ensure results from different instances of the query don't overlap.

This makes it difficult to use the built in Filter and Sort controls of the RadGridView. All of my sort and filter controls are currently custom, and outside of the RadGridView, so that they can be directly bound to properties of the ViewModel. When those properties change, the ViewModel cancels and clears the last query/results, and begins a new one.

I'd like a way to use the build in Filter/Sort controls. They all seem to require, to be used properly, that the bound collection be a CollectionView of some fashion. I'm fine with that. I can alter my ViewModel to expose one of those instead. The problem is I cannot figure out how to deal with the async delivery into this CollectionView. How do I do this? If I implement my logic in the Refresh method, how do I deliver the results asynchronously?

QueryableCollectionView seems to require an IEnumerable as a source. I don't have one. That needs to be built as filters/sorts are changed.

VirtualQueryableCollectionView seems the closest: but it seems to require knowing the total item count up front, which I do not and cannot know.

My only apparent option at this point, as far as I can tell, is to implement my own ICollectionView. Is this my remaining option?

Rossen Hristov
Telerik team
 answered on 28 Mar 2013
1 answer
147 views
When I select a value in a combobox I want to update a value on the dynamic viewmodel

I have this template:

<DataTemplate x:Key="RequiredCondition">
       <telerik:RadComboBox ItemsSource="{Binding Path=DataContext.Conditions, RelativeSource={RelativeSource FindAncestor,
                                              AncestorType={x:Type views:PropertyEditorView}}, Mode=OneWay}"
                            DisplayMemberPath="Name"
                            SelectedItem="{Binding CurrentPropertySet[RequiredCondition]}"
                            ToolTip="{Binding ElementName=cboRequiredCondition, Path=SelectionBoxItem.Description}"
                            ClearSelectionButtonContent="Clear"
                            ClearSelectionButtonVisibility="Visible"
                            TextSearchMode="Contains"
                            x:Name="cboRequiredCondition"/>
   </DataTemplate>

And when the selecting changes i want to do some stuff, Can I do this from within a template?

Right now I am having two problems. 
The clear button on the RadComboBox is not setting the value on my model and because I am using IntersectionMode = Dynamic viewmodel I can not use my model to execute the logic

public Condition VisibleCondition
      {
          get
          {
              if (Conditions.Count > 0 && _visibleCondition == null)
              {
                  _visibleCondition = Conditions.SingleOrDefault(x => x.Action == Condition.Actions.SET_IS_VISIBLE);
                  IsVisible = _visibleCondition == null;
              }
              return _visibleCondition;
          }
          set
          {
              if (_visibleCondition != value)
              {
                  IsVisible = value == null;
 
                  // remove the old condition
                  if (Conditions.Contains(_visibleCondition))
                      Conditions.Remove(_visibleCondition);
 
                  // add the new condition
                  _visibleCondition = value;
                  Conditions.Add(_visibleCondition);
                  IsVisible = _visibleCondition == null;
              }
          }
      }

Normal when I set IsVisible I will get a NotifyPropertyChanged (using Fody https://github.com/Fody/PropertyChanged.)
I am very close to my goal but I am unable to go the rest of the way alone (-.

Will it help if I have the depended properties in the same template?. 

 

Ivan Ivanov
Telerik team
 answered on 28 Mar 2013
2 answers
82 views
In your online example, when I click a tile, it is 'checked' in the top right corner and the border changes. This only works in my own code when I'm not using an itemsource... is this a bug or am I missing something? So, as an example, your code here does not work correctly; http://www.telerik.com/help/wpf/radtilelist-getting-started-populating-with-tiles.html
Maya
Telerik team
 answered on 28 Mar 2013
7 answers
444 views
The RadRibbonView's height cannot be adjust, when set it's height explicitly, it could be displayed correctly,
for example:

<Grid>
     <RowDefinition Height="100>
     <RowDef....>

       <telerik:RadRibbonView Grid.Row="0" >

      </telerik:RadRibbonView>

Kiril Vandov
Telerik team
 answered on 28 Mar 2013
17 answers
426 views
Hi,

I'm trying to use the I'm trying to use the RadRibbonView with the RadRibbonBackstage.
C# 4.0 with assemblies v2011.2.712.40

In a RadRibbonBackstageItem, I have put some listboxes, to let the user select items, before clicking on a button. Here is a stripped source.

<telerik:RadRibbonWindow x:Class="FrmMain"
        Height="700" Width="1000"
        WindowState="Maximized" WindowStartupLocation="CenterOwner" IconVisibility="Collapsed" Title="Title">
    <Grid x:Name="RootGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <telerik:RadRibbonView x:Name="ribbonView" ApplicationName="App" BackstageClippingElement="{Binding ElementName=RootGrid}">
            <telerik:RadRibbonView.Backstage>
                <telerik:RadRibbonBackstage>
                    <telerik:RadRibbonBackstageItem Header="Open" IsDefault="True">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
 
                            <Grid Margin="15 15 0 15">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <TextBlock Text="Title" FontSize="14" FontWeight="Bold" Margin="0 0 0 2" />
                                <Rectangle Grid.Row="1" Height="1" Fill="{StaticResource DottedLineBrush}" />
                                <ListBox Grid.Row="2" x:Name="lstOpenOne" Margin="0 4 0 0">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Grid>
                                                <Border BorderThickness="1" CornerRadius="4">
                                                    <TextBlock Text="{Binding Path=Label}" />
                                                </Border>
                                            </Grid>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </Grid>
 
                            <Rectangle Margin="10, 5" Grid.Column="1" Width="1" Fill="{StaticResource VerticalSplitterBrush}" />
 
                            <Grid Grid.Column="2">
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
 
                                <StackPanel Grid.Row="0" Margin="15 15 0 15">
                                    <TextBlock Text="Type" FontSize="14" FontWeight="Bold" Margin="0 0 0 2" />
                                    <Rectangle Height="1" Fill="{StaticResource DottedLineBrush}" />
                                    <ListView x:Name="lstOpen2" Margin="0 4 0 0" />
                                </StackPanel>
                                <StackPanel Grid.Row="1" Margin="15 15 0 15">
                                    <TextBlock Text="Zone d'acquisition" FontSize="14" FontWeight="Bold" Margin="0 0 0 2" />
                                    <Rectangle Height="1" Fill="{StaticResource DottedLineBrush}" />
                                    <ListView x:Name="lstOpen3" Margin="0 4 0 0">
                                        <ListBox.ItemTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Path=Name}" />
                                            </DataTemplate>
                                        </ListBox.ItemTemplate>
                                    </ListView>
                                </StackPanel>
 
                                <Button Grid.Row="2" Margin="0 4 0 0" Content="Open" x:Name="btnOpen" Click="btnOpen_Click" />
                            </Grid>
                        </Grid>
                    </telerik:RadRibbonBackstageItem>
                    <telerik:RadRibbonBackstageItem Header="Item 2">
                        <TextBlock Text="Blablabla" />
                    </telerik:RadRibbonBackstageItem>
                    <telerik:RadRibbonBackstageItem Header="Item 3">
                        <TextBlock Text="Blablabla too" />
                    </telerik:RadRibbonBackstageItem>
                </telerik:RadRibbonBackstage>
            </telerik:RadRibbonView.Backstage>
 
            <telerik:RadRibbonTab Header="Tab">
                <!-- Nothing related here-->
            </telerik:RadRibbonTab>
 
        </telerik:RadRibbonView>
         
        <Grid Grid.Row="1">
            <!-- Some controls -->
        </Grid>
        <Grid Grid.Row="2">
            <!-- Some controls -->
        </Grid>
    </Grid>
</telerik:RadRibbonWindow>

When my listboxes are populated with lots of items, the backstage item container is resized according to the listbox desired full height, 
making the backstage scrollbar being shown, instead of listbox's scrollbar.

Is this a small bug, or is there a thing I have missed ?

Thanks.

Damien
AEDT developer
Top achievements
Rank 1
 answered on 28 Mar 2013
1 answer
127 views
HI,

i tried to open the SalesDashboard in VS2010. It is running in debug-mode, but it is not possible to open perhaps the MainPage.xaml,
error: An Instanz of "ViewModel" could not be created,... it's not possible to learn out of this Project...

is there any working SalesDashboard-Project somewhere?

thanks
best regards
rene
Dimitrina
Telerik team
 answered on 28 Mar 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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?