Telerik Forums
UI for WPF Forum
2 answers
158 views
Is there a way to show the weeknumber in the GroupHeaderDateStringFormat.

I can now show the days of the week like this:
GroupHeaderDateStringFormat="{}Week: {0:d MMM} - {1:d MMM}"

But I would like to have the weeknumber instead.
Or is there an other way to show the weeknumbers?
Rieni De Rijke
Top achievements
Rank 1
 answered on 29 Oct 2013
1 answer
280 views
I have build a custom FilteringControl for my RadGridView and got it to work on the following way:

<telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn Header="Value" DataMemberBinding="{Binding Path=RowValue}"
       FilteringControl="{StaticResource ResourceKey=ViFilterControl}" />
</telerik:RadGridView.Columns>

My custom filtering control implements the IFilteringControl interface.

In our application there are many RadGridViews with many columns, so I want to make a kind of Style with ControlTemplate to force every filter to use my custom filter control, instead of implementing my custom filter control on every column definition.
The way I tried to solve my problem is:

<Style x:Key="FilteringControlStyle" TargetType="telerik:FilteringControl">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type Type=telerik:FilteringControl}">
                <wpfApplication1:FilterControl />
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
<Style TargetType="{x:Type Type=telerik:FilteringControl}" BasedOn="{StaticResource ResourceKey=FilteringControlStyle}" />

When I press the funnel on the gridview column my custom filter shows up, but the list stays empty. The cause of this is that the Prepare method of the IFilterControl is never called.

What am I doing wrong?
Vanya Pavlova
Telerik team
 answered on 29 Oct 2013
2 answers
107 views
Hello,

We are looking to use your WCF controls for calculator in order to make a more customized calculator with historical tape and adding machine with some grid-based features where numbers and operators will be displayed on right-side of basic calculator. I was analyzing your controls and was interested to know if that would be possible for our development team to do such customizations to the calculator?

- C
Ivan Ivanov
Telerik team
 answered on 29 Oct 2013
4 answers
261 views
Hi,
 
   I didn't want docking for the floating window(Tool Window). Is there any solution to do this?


With Thanks,
M.Vinnarasi
Vinnarasi
Top achievements
Rank 1
 answered on 29 Oct 2013
2 answers
230 views
Hi,

I want to set the care position to the selection end.
How to do it.

Regards
Ajita
Ajita
Top achievements
Rank 1
 answered on 29 Oct 2013
1 answer
57 views

Hello
I’m binding an image to a MapLayer based on a request to a server. Nothing is changed in that code.
The image is not loaded each time when I use 2013.2.SP1 or 2013.3. It works every time while using 2013.2.

This is not a constant problem, but occurs while zooming in and out between different zoom levels.
Ex. Going from zoomlevel 18 to zoomleven 19 several times. Suddenly the image will not load.

I’m listening to 
RadMap1.InitializeCompleted += (Model.KartInitializeCompleted);
RadMap1.SizeChanged += (Model.KartSizeChanged);
RadMap1.MouseLeftButtonDown += Model.KartLeftButtonDown;
RadMap1.MouseLeftButtonUp += Model.KartMouseLeftButtonUp;
RadMap1.ZoomChanging += (Model.KartZoomChanging);
RadMap1.ZoomingFinished += (Model.KartZoomingFinished);
RadMap1.CenterChanged += Model.KartCenterChanged;
RadMap1.PanningFinished += Model.KartPanningFinished;
RadMap1.MouseMove += (Model.KartMouseMove);
RadMap1.MouseDoubleClick += (Model.KartMouseDoubleClick);

And:
ZoomingFinished="KartZoomingFinished" 
ZoomChanging="KartZoomChanging"

And binding to 
ZoomLevel="{Binding ZoomLevel, Mode=TwoWay}"

Do you have any idea what changes can course my problems, and how to resolve them.

Andrey
Telerik team
 answered on 28 Oct 2013
3 answers
254 views
Hello
I've tried to make some customization to SelectionMiniToolbar based on information found on this forum but have some troubles.
To create similar custom toolbar I've used original code however I cannot use it directly because of some properties that are not accessible
  • this.radRichTextBox.CurrentSpanStyle
  • this.radRichTextBox.CurrentParagraphStyle
  • currentSpanStyle.GetPropertyValueSource
  • ((ToggleCommandBase)this.radRichTextBox.Commands.ToggleNumberedCommand).GetToggleState()

Could you advice me how to implement the same (as example) SelectionMiniToolbar as CustomSelectionMiniToolbar?

There is other issue I have that causing me trouble when using default SelectionMiniToolbar. When I put following code for RichTextBox:

this.editor.FontFamily = new FontFamily("Arial");
this.editor.FontSize = Unit.PointToDip(12);
this.editor.DocumentInheritsDefaultStyleSettings = true;
The values on mini toolbar are ones I want however Font and FontSize combos are too big. They are using the same font size as I set for RichTextBox instead of default toolbar ones, which is causing that values are not fit and look ugly (too big).
Petya
Telerik team
 answered on 28 Oct 2013
1 answer
239 views
Hi All,

    How can i achieve tab control to have the title bar feature too,I need to place a logo and maximise,minimise buttons in tab control style
 as shown in the attachment.
Hristo
Telerik team
 answered on 28 Oct 2013
2 answers
54 views
Hi

I am looking for slide show on Windows 8 UI using WPF application. However I see tile types like singleton, double and quadruple. Is there any way to create tile of 3x2 singletons tile.

Appreciate your help.

Thanks and regards,
Alpesh
David
Top achievements
Rank 1
 answered on 28 Oct 2013
5 answers
429 views
I have the folowing use of RadTreeView. I use Telerik_2012_3_1129

I bind RadTreeView hierarchically to ObservableCollection<FilterTreeNode>

public class FilterTreeNode : NotificationObject
{
  private ToggleState _checkState = ToggleState.On;
  protected ObservableCollection<FilterTreeNode> _children;
 
  public ToggleState CheckState
  {
     get { return _checkState; }
     set
     {
        if (_checkState != value)
        {
           _checkState = value;
           RaisePropertyChanged(()=>CheckState);
        }
     }
  }
 
  public ObservableCollection<FilterTreeNode> Children
  {
     get { return _children; }
     set
     {
        if (_children != value)
        {
           _children = value;
           RaisePropertyChanged(() => Children);
        }
     }
  }
}

For the RadTreeView ItemContainerStyle I use following style:

<Style x:Key="ItemContainerStyle" TargetType="telerik:RadTreeViewItem">
    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
    <Setter Property="CheckState" Value="{Binding CheckState, Mode=TwoWay}" />
    <Setter Property="MinHeight" Value="0"></Setter>
</Style>

 Steps of usage:
 1. I initialize observable collection with few levels, eg. L1, L2, L3 (Items from level L1 are expanded by default). Item1 in L2 contains few items.
 2. I bind this observable collection to the tree. Everything is working correctly.
 3. After a while in separate thread I finds new element that I need to add to the Item1 (from the level L2) which wasn't expanded yet, but it have few items.
 4. I use Application.Current.Dispatcher.Invoke((Action) (AddRecordsFromQueue)) method to add these new elements to the tree in UI thread.
 5. I create FilterTreeNode class for the new element and by default this class have _checkState = ToggleState.On
 6. I add this new element to _children collection of element Item1
 7. AND THAN: suddenly Item1 is unchecked automatically in the tree :(
 
  I tried to investigate this and looked into the RadTreeViewItem code which is invoked in stack trace when its CheckState is changing to ToggleState.Off
 
 So what is happening:
1. MeassureOverride is invoked on RadTreeViewItem related to my Item1.
2. In MeasureOverride the method this.SetCheckStateWithNoPropagation(RadTreeViewItem.CalculateItemCheckState(this));
3. In CalculateItemCheckState the following code is invoked:

...
 
ToggleState state = ToggleState.Off;
if (item.Items.Count > 0)
{
    if (checkedCount == item.Items.Count)
    {
        state = ToggleState.On;
    }
    else if (checkedCount + indetermCount > 0)
    {
        state = ToggleState.Indeterminate;
    }
}
else
{
    state = item.CheckState;
}
 
return state;


5. Previous method probably returns ToggleState.Off and set in to the RadTreeViewItem
6. Via binding the CheckState in my Item1 is set to ToggleState.Off


First, the logic in the CalculateItemCheckState is interesting. Why Parent item gets CheckState set to ToggleState.Indeterminate when it contains at least 1 child in ToggleState.Indeterminate state? This is strange behaviour. I think some users (e.g. me) would like to have parent node checked no matter what are the states of its children.

Second, the most important is that before the CheckState in the Item1 was automatically set to ToggleState.Off there was no checking of the CheckState of the child items (I checked it by putting breakpoint in getter). So probably UI children of Item1 weren't created yet or they were created but wasn't binded yet to the underlying FilterTreeNode objects, so RadTreeViewItems had ToggleState.Indeterminate state before binding.
Probably children UI items wasn't created yet if parent wasn't expanded, so in that case the logic in section 3 should return the current CheckState of the item, but somehow it returns ToggleState.Off.

I also tested the case when I have Item1 expanded before this new element is added. In this case the CheckState of Item1 is automatically set to ToggleState.Indeterminate.



So, am I doing something wrong or it is a bug? What can I do to stop getting my tree nodes unchecked automatically? I think that if it is a bug not just my bad usage of this control than it is critical.

I think that this problem is also somehow related to these 2 problems:
http://www.telerik.com/community/forums/wpf/treeview/binding-to-checkstate.aspx
http://www.telerik.com/community/forums/wpf/treeview/databinding-for-checkstate.aspx


Regards,
Adrian
Tina Stancheva
Telerik team
 answered on 28 Oct 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?