Telerik Forums
UI for WPF Forum
3 answers
151 views


I have a RadOutlookBar with several textboxes within the RadOutlookBarItem.  When I run the code I am unable to tab through the text boxes.  Is there anything special I have to do to be able to tab through the controls?

 

<telerik:RadOutlookBar telerik:StyleManager.Theme="Office_Blue" DropDownDisplayMode="Visible" IsVerticalResizerVisible="False" IsMinimizable="False" Grid.Column="2">

 

<telerik:RadOutlookBarItem Header="Fields:">

<StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Height="auto" Focusable="True">                       

<TextBlock Margin="5,5,0,0">Name:</TextBlock>                      

 

<TextBox x:Name="newName" Text="{Binding Name, Mode=TwoWay}" HorizontalAlignment="Left" Width="320" Margin="5,0,0,0" Style="{StaticResource txtStyleLeftAligned}" MaxLength="256"/>                       

 

<TextBlock Margin="5,5,0,0">Company Name:</TextBlock>

 

<TextBox x:Name="newCompany" Text="{Binding Company, Mode=TwoWay}" HorizontalAlignment="Left" Width="320" Margin="5,0,0,0" Style="{StaticResource txtStyleLeftAligned}" MaxLength="500" />
                       

<TextBlock Margin="5,5,0,1">Email:</TextBlock>

 

<TextBox x:Name="newEmail" Text="{Binding Email, Mode=TwoWay}" HorizontalAlignment="Left" Width="320" Margin="5,0,0,0" Style="{StaticResource txtStyleLeftAligned}" MaxLength="50"/>

 

<CheckBox x:Name="newActiveYN" FlowDirection="RightToLeft" IsChecked="{Binding Active, Converter={StaticResource converter}}" Margin="0,5,11,0" HorizontalAlignment="Left" Style="{StaticResource cbxBase}" Content="Active"/>
                     

<TextBlock HorizontalAlignment="Left" Width="290" Margin="5,5,0,0">Locations:</TextBlock>                      

 

<ListBox x:Name="lbLocations" Height="100" Margin="5,5,10,0" ItemsSource="{Binding Locations, Mode=TwoWay}" HorizontalAlignment="Left" Width="320" Style="{StaticResource lbxStyleRequired}">                           

 

<ListBox.ItemTemplate>

<DataTemplate>

<CheckBox Checked="Location_Checked" Content="{Binding DbLocation.Name}" IsChecked="{Binding IsChecked}" Tag="{Binding}" Unchecked="Location_UnChecked" />

</DataTemplate>

</ListBox.ItemTemplate>

</ListBox>

<TextBlock HorizontalAlignment="Left" Margin="5,5,0,0">Services:</TextBlock>

<ListBox x:Name="lbContactServices" Height="150" Margin="5,5,10,0" ItemsSource="{Binding Services, Mode=TwoWay}" HorizontalAlignment="Left" Width="320" IsEnabled="False">

<ListBox.ItemTemplate>

<DataTemplate>

<CheckBox IsChecked="{Binding IsChecked}" Content="{Binding DbService.Name}"/>

</DataTemplate>

</ListBox.ItemTemplate>

</ListBox>

 

<StackPanel Orientation="Horizontal" Margin="0,0,0,0">

<Button Content="New" Style="{StaticResource btnBase}" Margin="5,5,0,0" Width="100" Command="{x:Static NewBrokerButtonCommand}"/>

 

<Button Content="Save" Style="{StaticResource btnBase}" Margin="5,5,0,0" Width="100" Command="{x:Static UpdateButtonCommand}"/>                    

 

</StackPanel>

</StackPanel>

</telerik:RadOutlookBarItem>

 

</telerik:RadOutlookBar>

Kiril Vandov
Telerik team
 answered on 30 Jan 2014
1 answer
171 views
Hi, I have problem with binding ObservableCollection on ItemsSource of FinancialIndicator. When I bound CandleChart series, I haven't problem.


<StackPanel Grid.Row="2" Orientation="Vertical">
            <StackPanel Orientation="Horizontal">
                <ComboBox x:Name="IndicatorComboBox" MinWidth="150" Width="Auto" ItemsSource="{Binding IndicatorCollection}" SelectedItem="{Binding SelectedIndicator}" >
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectionChanged">
                            <i:InvokeCommandAction Command="{Binding ElementName=IndicatorComboBox,Path=SelectedItem.ApplyPararmetersComand}" CommandParameter="{Binding ElementName=IndicatorChart}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Path=DisplayName}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <!--<ContentPresenter Content="{Binding ElementName=IndicatorComboBox,Path=SelectedItem }"  />-->
                <Button  Content="Apply" Command="{Binding ElementName=IndicatorComboBox,Path=SelectedItem.ApplyPararmetersComand}" CommandParameter="{Binding ElementName=IndicatorChart}" />
            </StackPanel>
            <ContentPresenter Content="{Binding Path=SelectedIndicator}" />

            
        </StackPanel>

-------
 <ControlTemplate x:Key="StohasticIndicator" >
        <StackPanel Orientation="Vertical" >
        <WrapPanel Orientation="Horizontal">
            <TextBlock Text="SignalPeriod:" />
            <TextBox Text="{Binding Path=SignalPeriod,Mode=TwoWay}"/>
            <TextBlock Text="MainPeriod:" />
            <TextBox Text="{Binding Path=MainPeriod,Mode=TwoWay}"/>
            <TextBlock Text="Slowing:" />
            <TextBox Text="{Binding Path=SlowingPeriod,Mode=TwoWay}"/>
        </WrapPanel>
            <telerik:RadCartesianChart x:Name="IndicatorChart" DataContext="{Binding}"  Visibility="{Binding IndicatorVisibility}" Zoom="{Binding Path=DataContext.IndicatorChartZoom, RelativeSource={RelativeSource AncestorType=vw:CandleChartView, Mode=FindAncestor}}" Width="Auto" >
                <telerik:RadCartesianChart.HorizontalAxis>
                    <telerik:DateTimeContinuousAxis ShowLabels="True"
                                                MajorStep="{Binding Path=DataContext.MajorStep, RelativeSource={RelativeSource AncestorType=vw:CandleChartView, Mode=FindAncestor}}"
                                                MajorStepUnit="Minute"
                                                LabelInterval="6"
                                                LabelTemplate="{StaticResource axisLabelTemplate}"
                                                PlotMode="OnTicksPadded"
                                                Minimum="{Binding Path=DataContext.MinTime, RelativeSource={RelativeSource AncestorType=vw:CandleChartView,Mode=FindAncestor}}"  
                                                Maximum="{Binding Path=DataContext.MaxTime, RelativeSource={RelativeSource AncestorType=vw:CandleChartView,Mode=FindAncestor}}"
                                                >
                    </telerik:DateTimeContinuousAxis>
                </telerik:RadCartesianChart.HorizontalAxis>
                <telerik:RadCartesianChart.VerticalAxis>
                    <telerik:LinearAxis Minimum="0" Maximum="100" LabelInterval="2"  />
                </telerik:RadCartesianChart.VerticalAxis>
                <telerik:RadCartesianChart.Behaviors>
                    <telerik:ChartPanAndZoomBehavior ZoomMode="None" PanMode="Horizontal"   />
                </telerik:RadCartesianChart.Behaviors>
                <telerik:RadCartesianChart.Series>
                    <telerik:CandlestickSeries x:Name="s1" ItemsSource="{Binding Path=Source}"                                           
                                               OpenBinding="OpenPrice"
                                               HighBinding="HightPrice"
                                               LowBinding="LowPrice"
                                               CloseBinding="ClosePrice"
                                               CategoryBinding="StartTime" >

                    </telerik:CandlestickSeries>
                    
                </telerik:RadCartesianChart.Series>
                <telerik:RadCartesianChart.Indicators >

                    <!--<telerik:StochasticFastIndicator ItemsSource="{Binding Path=DataContext.Candles, RelativeSource={RelativeSource AncestorType=vw:CandleChartView, Mode=FindAncestor}}" CategoryBinding="StartTime" CloseBinding="ClosePrice" HighBinding="HightPrice" LowBinding="LowPrice" Stroke="Blue" StrokeThickness="1" MainPeriod="{Binding MainPeriod}" SignalPeriod="{Binding SignalPeriod}" />-->
                    <telerik:StochasticFastIndicator  ItemsSource="{Binding Path=Source}" CategoryBinding="StartTime" CloseBinding="ClosePrice" HighBinding="HightPrice" LowBinding="LowPrice" Stroke="Blue" StrokeThickness="1" MainPeriod="{Binding MainPeriod}" SignalPeriod="{Binding SignalPeriod}" />
                    <telerik:StochasticSlowIndicator ItemsSource="{Binding Path=Source}" CategoryBinding="StartTime" CloseBinding="ClosePrice" HighBinding="HightPrice" LowBinding="LowPrice" Stroke="Red" StrokeThickness="1" MainPeriod="{Binding MainPeriod}" SignalPeriod="{Binding SignalPeriod}" SlowingPeriod="{Binding SlowingPeriod}" />

                </telerik:RadCartesianChart.Indicators>
                <telerik:RadCartesianChart.Annotations>
                    <telerik:CartesianGridLineAnnotation Value="80" Axis="{Binding ElementName=IndicatorChart, Path=VerticalAxis}" StrokeThickness="1" Stroke="Black"  Label="80" />
                    <telerik:CartesianGridLineAnnotation Value="20" Axis="{Binding ElementName=IndicatorChart, Path=VerticalAxis}" StrokeThickness="1" Stroke="Black" Label="20" />
                </telerik:RadCartesianChart.Annotations>

            </telerik:RadCartesianChart>
        </StackPanel>
    </ControlTemplate>
    <DataTemplate DataType="{x:Type models:StohasticIndicator}">
        <Control Template="{StaticResource ResourceKey=StohasticIndicator}" DataContext="{Binding}" />
    </DataTemplate>
---------------------
Source is ObservableCollection of Candle , and some times updates from external service.

public class Candle : INotifyPropertyChanged
    {
        private Dispatcher dispatcher = Dispatcher.CurrentDispatcher;

        private double _openPrice;

        private double _closePrice;

        private double _hightPrice;

        private double _lowPrice;

        private double _volume;

        private DateTimeOffset _startTime;

        private DateTimeOffset _endTime;

        public double OpenPrice
        {
            get { return _openPrice; }
            set
            {
                if (value != _openPrice)
                {
                    _openPrice = value;
                    OnPropertyChanged("OpenPrice");
                }
            }
        }

        public double ClosePrice
        {
            get { return _closePrice; }
            set
            {
                if(value != _closePrice)
                {
                    _closePrice = value;
                    OnPropertyChanged("ClosePrice");
                }
            }
        }

        public double HightPrice
        {
            get { return _hightPrice; }
            set
            {
                if (value != _hightPrice)
                {
                    _hightPrice = value;
                    OnPropertyChanged("HightPrice");
                }
            }
        }

        public double LowPrice
        {
            get { return _lowPrice; }
            set
            {
                if (value != _lowPrice)
                {
                    _lowPrice = value;
                    OnPropertyChanged("LowPrice");
                }
            }
        }

        public double Volume
        {
            get { return _volume; }
            set
            {
                if (_volume != value)
                {
                    _volume = value;
                    OnPropertyChanged("Volume");
                }
            }
        }

        public DateTimeOffset StartTime
        {
            get { return _startTime; }
            set
            {
                if (_startTime != value)
                {
                    _startTime = value;
                    OnPropertyChanged("StartTime");
                }
            }
        }

        public DateTimeOffset EndTime
        {
            get { return _endTime; }
            set
            {
                if (_endTime != value)
                {
                    _endTime = value;
                    OnPropertyChanged("EndTime");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string name)
        {
          

            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
               
                    dispatcher.BeginInvoke(DispatcherPriority.Normal,
                               (ThreadStart)delegate()
                               {
                                   PropertyChanged(this, new PropertyChangedEventArgs(name));
                               });
               
            }          
        }
    }

CandleSeries  updates normal, but Financial indicator doesn't work. Help, please :)
Martin Ivanov
Telerik team
 answered on 30 Jan 2014
5 answers
174 views
Hello,

i'm using RadGridView to show many columns. Most columns have their groups. The request is to reorder or reset the visibility of the columns.

1). When i drag columns from a group to another, that will split the group header. That's horrible. I read another thead and know that could be refused using event ColumnReordering. Problem is, that allows any users to reorder columns inside of their group. Could they reorder the whole group with a easy way in RadGridView?

2). Obviously we can reset the visibility of columns. Is there a way to set visibility of whole group? Or perhaps is that only way to set all the columns one by one inside the group.

Thanks a lot!

Ivan
Dimitrina
Telerik team
 answered on 30 Jan 2014
4 answers
183 views
Please can you recommend a way that we can overcome this problem? The lines between siblings on a treeview don't always appear as expected. 

Many thanks
Edmund Covington
Top achievements
Rank 1
 answered on 30 Jan 2014
3 answers
111 views
Hi,

I attached an image showing what I like to have.

The idea - a chart representing values of a time series (line in the sample - could also be Bar or...).
During the period something happens (let's say it rains) - I know the start end the end time of this event.
Now I want to mark the rain period.

How can this be achived?

And I want the Y axes to be dynamic, so that if a higher value scrolls in it should expand, keeping the marked section to the top.

Last not least - it would be great if that will also work for Windows Phone and Windows 8.

Thank you
Manfred
ManniAT
Top achievements
Rank 2
 answered on 30 Jan 2014
2 answers
216 views
Hi,

I've got a RadGridView bound to an observable collection, I want to apply a DataTrigger style based on the IsAlternating value of the the row.
I've wired up the IsAlternating field to the grid (see xaml below) to see what value it is populating and it is always false.

 <telerik:GridViewDataColumn Header="Is Alternating"                                          
                                          DataMemberBinding="{Binding IsAlternating, RelativeSource={RelativeSource AncestorType={x:Type           telerik:GridViewRow}}}" Width="100"
                                                  HeaderTextAlignment="Center" TextAlignment="Center" />

So if I had 10 items in my collection, I would see 10 rows in my grid and the Is Alternating column display's false every time.
Am I misunderstanding what IsAlternating is used for?

I was under the impression that I would get something like (which is what I want)

Is Alternating
False
True
False
True
False
True
False
True
False
True

i.e. every other row would indicate if it is alternating or not.

Is there a  property that I can bind which will tell me if a row is alternating or not?

Thanks and regards,

Chris



Dimitrina
Telerik team
 answered on 30 Jan 2014
3 answers
208 views
Hi everyone,

I have developed a sample projet using RadControls for WPF Q3 2013 Trial Version.
The main window contains :
- A "Create Pane" button
- A user control which encapsulates a Docking control. The Docking's HasDocumentHost property is set to false

The StyleManager.ApplicationTheme property is set to an instance of SummerTheme.

Here is the user control's code-behind :

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
 
namespace NoDocumentHost
{
    /// <summary>
    /// Interaction logic for DockingUC.xaml
    /// </summary>
    public partial class DockingUC : UserControl
    {
        public DockingUC()
        {
            InitializeComponent();
        }
 
        public void CreatePane()
        {
            RadSplitContainer l_splitContainer = new RadSplitContainer();
            RadPaneGroup l_paneGroup = new RadPaneGroup();
 
            l_splitContainer.Items.Add(l_paneGroup);
            m_docking.Items.Add(l_splitContainer);
 
            RadPane l_pane = new RadPane()
            {
                CanUserPin = true,
                Title = "Title",
                Header = "Header",
                CanUserClose = true,
                ContextMenuTemplate = null
            };
 
            UserControl1 l_userControl = new UserControl1();
            l_pane.Content = l_userControl;
 
            l_paneGroup.Items.Add(l_pane);
            l_pane.MakeFloatingDockable();
        }
 
        private void DockingPaneStateChange(object p_sender, Telerik.Windows.RadRoutedEventArgs p_args)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                RadPane l_pane = (RadPane)p_args.OriginalSource;
                RadPaneGroup l_paneGroup = l_pane.PaneGroup;
                l_paneGroup.TabStripPlacement = Dock.Top;
            }));
        }
    }
}

A floating Pane is created when the user clicks the "Create button".
Each PaneGroup's TabStripPlacement property is set to Top.
The Pane header is not visible when a Pane is docked as shown on the attached picture 1.png.

I have commented the DockingPaneStateChange's body for a testing purpose.
Each PaneGroup's TabStripPlacement property was not set to Top.
The Pane header is visible when a Pane is docked as shown on the attached picture 2.png.

I have looked for information on how to make the Pane header visible when the PaneGroup's TabStripPlacement property is set to Top.
I have read the following forum thread : Forum Thread

I do not understand why the Pane header is not visible when the PaneGroup's TabStripPlacement property is set to Top.
Does the PaneGroup's TabStripPlacement property setter change the PaneGroup's TopTemplate property ?
Do I have to follow the procedure described on the forum thread ?

Thank you in advance for your answer
Vladi
Telerik team
 answered on 30 Jan 2014
5 answers
534 views
We are using the GridViewMaskedInputColumn in RadGridView with MaskType="Numeric".
The binded value is type of nullable integer, so is there any method to accept empty or a numeric value in the gridview column.

Update: it is supported by default, I have checked a different column.

But my question has a change, how to avoid default value 0 on cell edit.

Regards,
Reyas Mohammed
Reyas
Top achievements
Rank 2
 answered on 30 Jan 2014
5 answers
440 views
Hi,

Just I Updated my dlls ver from 2011 Q3 SP1 to 2012 Q2 SP1 (0730)
After this,

PlacementTarget of ContextMenu always returning null instead of actual element.

Is there any issue while getting PlacementTargetValue or is there any alternative for this?

I tried with GetClickedElement but it is not giving me exact element at most of the places.

For ex:,
I was added Context Menu to the parent element and I have some child elements to this parent element.
At this point of time, GetClickedElement is giving me the child element instead of parent element.
Rosen Vladimirov
Telerik team
 answered on 30 Jan 2014
1 answer
164 views
hi~
The issue can be showed in the code below
I have two TextBlocks, the only difference between them is where they are.
but the one inside the RadPane never fires a Drop Event.

xaml:
<Window x:Class="test.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
        <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TextBlock Name="src" Text="src" Grid.Column="0" PreviewMouseDown="src_PreviewMouseDown"></TextBlock>
        <telerik:RadDocking Grid.Column="1">
            <telerik:RadSplitContainer HorizontalAlignment="Stretch">
            <telerik:RadPaneGroup>
                <telerik:RadPane>
                    <Grid>
                        <TextBlock AllowDrop="True" Background="LightYellow" Text="dst1" Drop="TextBlock_Drop"/>
                    </Grid>
                </telerik:RadPane>
            </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
        <TextBlock AllowDrop="True" Background="LightBlue" Text="dst2" Drop="TextBlock_Drop" Grid.Column="2"/>
    </Grid>
</Window>

code behind:
//using blahblah...
namespace test
{
    public partial class MainWindow : Window
    {
        public MainWindow() {
            InitializeComponent();
        }
        private void TextBlock_Drop(object sender, DragEventArgs e) {
            (sender as TextBlock).Text = "On drop";
        }
        private void src_PreviewMouseDown(object sender, MouseButtonEventArgs e){
            string k = (sender as TextBlock).Text;
            DragDropEffects allowedEffects = DragDropEffects.Move | DragDropEffects.Copy | DragDropEffects.Link;
            DragDrop.DoDragDrop(sender as TextBlock, k, allowedEffects);
        }
    }
}
Rosen Vladimirov
Telerik team
 answered on 30 Jan 2014
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?