Telerik Forums
UI for WPF Forum
2 answers
107 views
I am using 2014.2.729.45 RadOutlookBar as a navigation tool in my wpf app.  there are 8 menu items.  I have set active items count = 5. and my selected index is bound to my view model.

If increase, via the app when running, my active items count to 8 (showing all options), and I click on ANY outlookBarItem, then the correct menu appears.

Interestingly, if I say keep the active items count to 5 and I have 3 items in the small bar across the bottom I get very strange behavior.  so my description let's say there is Item1 thru Item 8.

Item1 thru Item5 are showing
Item6 to Item8 are in the bottom bar, small icon section.

If I click on icon for Item6, the viewmodel registers Item6 clicked.
If I click on icon for Item7, the viewmodel registers Item7 clicked, and then Item6 click. - so item 6 appears
If I click on icon for Item8, the viewmodel registers Item8 clicked, and then Item7 click, then item6. - so item6 appears

so you can never get to item7 and item8 to show, unless you make all items active.


<telerik:RadOutlookBar Grid.Row="0"
                             Grid.Column="0"
                             VerticalContentAlignment="Center"
                             ActiveItemsCount="5"
                             Background="{StaticResource ColorUnityWhite}"
                             IsMinimizable="False"
                             IsVerticalResizerVisible="False"
                             MinimizedButtonContent="Menu"
                             MinimizedWidth="40"
                             SelectedIndex="{Binding CurrentMenuIndex,
                                                     Mode=TwoWay,
                                                     UpdateSourceTrigger=PropertyChanged}"
                             >

this what an Item looks like:

<!--  home  -->
            <telerik:RadOutlookBarItem Height="40"
                                      BorderBrush="{x:Null}"
                                      Header="Home"
                                      SmallIcon="/Ppdg.Unity.Client.UI;component/Assets/Images/homeVerySmall.gif"
                                      Visibility="{Binding Path=CanAccessHome,
                                                           Mode=OneWay,
                                                           Converter={StaticResource Bvc}}"
                                      >
                <telerik:RadOutlookBarItem.HeaderTemplate>
                    <DataTemplate>
                        <Grid>
                            <telerik:RadDockPanel>
                                <Image Width="32"
                                      Height="32"
                                      Source="/Ppdg.Unity.Client.UI;component/Assets/Images/homeMedium.gif"
                                      ToolTip="Home"
                                      telerik:RadDockPanel.Dock="Left"
                                      />
                                <TextBlock Margin="6 6 0 0"
                                          Style="{StaticResource MainMenuTextBlockStyle}"
                                          Text="Home"
                                          />
                            </telerik:RadDockPanel>
                        </Grid>
                    </DataTemplate>
                </telerik:RadOutlookBarItem.HeaderTemplate>
            </telerik:RadOutlookBarItem>

Robert
Top achievements
Rank 1
 answered on 08 Jan 2015
2 answers
144 views
Hello,

While trying to implement the OutlookBar as a container in Prism tutorial (http://docs.telerik.com/devtools/wpf/controls/radoutlookbar/how-to/How_to_Use_RadOutlookBar_as_a_Container_in_Prism_Application.html), the headers do not appear as the tutorial shows. 

I am following the first guide where it adds a header by adding a member, ItemHeader, to the view.  The OutlookBar is set with the DisplayProperty = "ItemHeader", but upon execution, the application does not show the header.  If the horizontal bar is dragged down, the items are minimized and can be read.  So, it appears that the header is set, but is not being displayed properly while not minimized.

I'm assuming this is a simple binding error, but I'm not sure how to proceed.
Paul
Top achievements
Rank 1
 answered on 08 Jan 2015
4 answers
156 views
Hi.

I have a custom appointment with some additional properties. When I change these properties I update appointments End time and Subject, but I see the changes only after I click on OK button. Calling OnPropertyChanged brings no effect. How can I update the UI in the edit dialog, so users can see the changes?
tarnegur
Top achievements
Rank 1
 answered on 08 Jan 2015
10 answers
297 views
I have a DocumentHost with some Panes bound to a PaneGroup. Everything works well, except when I want to Drag a Pane for Docking it, as soon as I grabbed the tab and want to drag it, an error message "System.ArgumentException was unhandled / Message: This pane cannot be removed from parent, because it doesn't have one!" appears. What is my mistake here?
Thanks for your support :)
Best regards

<!-- Tabs -->
<telerik:RadDocking.DocumentHost>
    <telerik:RadSplitContainer Margin="0,-3,0,0" BorderThickness="1">
        <telerik:RadPaneGroup TabStripPlacement="Top"
                              ItemsSource="{Binding Tabs}"
                              Background="#FFF0F0F0"
                              BorderThickness="1"
                              BorderBrush="#FF868686">
            <telerik:RadPaneGroup.ItemContainerStyle>
                <Style TargetType="telerik:RadPane">
                    <Setter Property="BorderThickness" Value="0" />
                    <Setter Property="CanUserClose" Value="False" />
                    <Setter Property="CanFloat" Value="True" />
                    <Setter Property="CanUserPin" Value="False" />
                    <Setter Property="ContextMenuTemplate" Value="{x:Null}" />
                </Style>
            </telerik:RadPaneGroup.ItemContainerStyle>
            <telerik:RadPaneGroup.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <StackPanel.Resources>
                            <Style TargetType="{x:Type Ellipse}">
                                <Setter Property="Width" Value="3"/>
                                <Setter Property="Height" Value="3"/>
                                <Setter Property="Fill" Value="Red"/>
                                <Setter Property="Margin" Value="3,0,3,0"/>
                            </Style>
                        </StackPanel.Resources>
                        <TextBlock Text="{Binding Title}" />
                        <Ellipse Visibility="{Binding IsDirty, Converter={StaticResource BooleanToVisibilityConverter}}" />
                        <Button Command="{Binding CloseCommand}"
                        Width="12" Height="12" Margin="4,0,0,0" ToolTipService.ToolTip="Close Tab">
                            <Button.Content>
                                <Path Data="M0,0 L6,6 M6, 0 L0,6" Stroke="Black" StrokeThickness="0.5" />
                            </Button.Content>
                        </Button>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadPaneGroup.ItemTemplate>
            <telerik:RadPaneGroup.ContentTemplate>
                <DataTemplate>
                    <Views:ClientDetails
                    DataContext="{Binding}" IsDirty="{Binding IsDirty,Mode=TwoWay}" />
                </DataTemplate>
            </telerik:RadPaneGroup.ContentTemplate>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking.DocumentHost>
Nasko
Telerik team
 answered on 08 Jan 2015
3 answers
653 views

Hi,

 

I cannot figure out the syntax to bind an ADO.NET DataTable to a Rad Combobox. Can you please help me by posting some source code on how to accomplish the following task:

 

 I have a DataTable fo countries that has an id column and a name column. I want to show the country name in the combo box but when an item is selected in the combo box, I want to return the id. This is a very common task in asp.net and win forms but I cannot figure out how to do this task using the rad combo box.

 

How would I accomplish something like this using the rad combo box?

 

DataTable dt = GetCountries();

This.cboCountries.DataText = “Country”;

This.cboCountries.DataValue = “id”;

This.cboCountries.DataSource = dt;

This.cboCountries.DataBind();

 

// get the selected id in the combo box

Int id = this.cboCountries.SelectedValue;

 

Can you please post the correct syntax to accomplish this task using the rad combo box.

 

Thanks for the help!

 

Bill

Kalin
Telerik team
 answered on 08 Jan 2015
4 answers
431 views
Here's what I'm trying to accomplish: I have an app that needs to show the user's current location on a map (determined using an attached GPS puck.  The library I'm using provides me the latitude, longitude and accuracy (in meters).  I will also want to place other pins on the map (lat, long only).  I want to display a dot on the map that represents the lat/long, with a circle around it, the width of which displays the accuracy of the reading.

So, I will have an observable collection of objects that have lat, long and accuracy.  I've been trying to follow this page in the documentation:

http://docs.telerik.com/devtools/wpf/controls/radmap/features/visualization-layer/data-binding.html

but this is pixel-based sizing.  I want the ellipse I draw to be a certain height/width determined by a distance on the map.  I have the radius in meters, but I also have a function that will convert it in to a value that represents the degrees of latitude/longitude, which works in the EllipseData object.  However, since I'm databinding, the EllipseData object can't be used in the items template (not a Dependency object) and even still, the properties for width and height can't be bound as they aren't dependency properties.

How can I specify a width/height of a data-bound ellipse in the information or visualization layers in meters (or degrees)?  A related question that may be the solution is this: how can I determine the scale of the currently displayed map view-port?  I could certainly use a value converter or attached property or something to figure out the pixel width from there (though I'd prefer a simpler way).

Thanks in advance!

Adam
Petar Mladenov
Telerik team
 answered on 08 Jan 2015
1 answer
217 views
I dont find missing values property for Scatterlineseries. Is it there only for HTML? My requirement is to interpolate the missing points in scatterlineseries and after interpolation is there a way to get the interpolated value.

Thanks & Regards,
Sandeep Kumar Vidiyala
Petar Marchev
Telerik team
 answered on 08 Jan 2015
3 answers
858 views
Hello,

I'm using xaml, view model and validation rule in C#

The RadDatePicker has default validation for any invalid date. 

In my xaml, I have my own validation rule for RadDatePicker and RadTimePicker with this Style of my ControlTemplate to display the error. (please see the xaml code below the for the Control Template Style and my validation rule)

We allow the user to put nothing or empty string in the DatePicker unless we set it to mandatory that will use our validation rule to output a customized error style and message.In our validation rule, if we want to raise the error, it will use this code "return new ValidationResult(false, ErrorMessage);" However, since the default validation of RadDatePicker or RadTimePicker, it still set show the default error even the validation rule switches off the validation with this line  "return new ValidationResult(true, null);"

 Is there way I can disable the default behaviour and implement the custom behaviour I have?

Thanks.

Jason

====  Style of my ControlTemplate ==========

<ControlTemplate x:Key="validationTemplate">
                <DockPanel>
                    <TextBlock Foreground="Red" FontSize="20">!</TextBlock>
                    <AdornedElementPlaceholder/>
                </DockPanel>
            </ControlTemplate>
            <Style x:Key="radDatePicker" TargetType="{x:Type telerik:RadDatePicker}">
                <Style.Triggers>
                    <Trigger Property="Validation.HasError" Value="true">
                        <Setter Property="ToolTip"
              Value="{Binding RelativeSource={x:Static RelativeSource.Self},
                              Path=(Validation.Errors)[0].ErrorContent}"/>
                    </Trigger>
                </Style.Triggers>
            </Style>
            <Style x:Key="radTimePicker" TargetType="{x:Type telerik:RadTimePicker}">
                <Style.Triggers>
                    <Trigger Property="Validation.HasError" Value="true">
                        <Setter Property="ToolTip"
              Value="{Binding RelativeSource={x:Static RelativeSource.Self},
                              Path=(Validation.Errors)[0].ErrorContent}"/>
                    </Trigger>
                </Style.Triggers>
            </Style>
  
=================================================

==== xaml code to my validation rule ==========

 <telerik:RadDatePicker.SelectedDate>
                        <Binding Path="CommercialStartDateSelectedDate"
                                     UpdateSourceTrigger="PropertyChanged"
                                     Mode="TwoWay"
                                     >
                            <Binding.ValidationRules>
                    <common:MandatoryValidationRule
                                   
                                            ValidatesOnTargetUpdated="False"
                                            FieldName="CommercialStartDate" InstanceId="{common:DataResourceBinding DataResource={StaticResource commercialLayoutDesignInstanceId}}" IsMandatory="{common:DataResourceBinding DataResource={StaticResource commercialStartDateIsMandatory}}" ErrorMessage="{x:Static local:Globalization.CommercialStartDateMandatoryErrorMessage}" >
                    </common:MandatoryValidationRule>

                    <common:RecommendedValidationRule
                                            ValidatesOnTargetUpdated="False"
                                            IsRecommended="{common:DataResourceBinding DataResource={StaticResource commercialStartDateIsRecommended}}" ErrorMessage="{x:Static local:Globalization.CommercialStartDateRecommendedErrorMessage}" >
                    </common:RecommendedValidationRule>
                </Binding.ValidationRules>


Thanks,
Kalin
Telerik team
 answered on 08 Jan 2015
1 answer
110 views
Hello,

Can i change the RadWaterMarkTextBox, used by the AutoCompleteBox, by an other TextBox with ControlTemplate?

Does someone have an example?
Kalin
Telerik team
 answered on 08 Jan 2015
5 answers
814 views
I am trying to set a gridview filterdescriptor in xaml. 

The filterdescriptor looks like this: 

<telerik:RadGridView.FilterDescriptors>
    <telerik:FilterDescriptor Member="Customer.Name" Value="{Binding Name, ElementName=gvWorkOrders.SelectedItem}"/>
</telerik:RadGridView.FilterDescriptors>

The idea is that gridview A automatically filters according to what is selected in gridview B. 

The full error is as follows:

System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Name; DataItem=null; target element is 'FilterDescriptor' (HashCode=61845703); target property is 'Value' (type 'Object')


Any ideas? I'm happy to post more code, just let me know what other information would help.
Dimitrina
Telerik team
 answered on 08 Jan 2015
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?