Telerik Forums
UI for WPF Forum
3 answers
157 views
Hello,

This is my first time writing you here...and i think that your help is outstanding.

I have simple question, its maybe something basic that i don't understand..

If i put in docking area simple rad pane, with command binding for open...Open button will always be disabled.

/////////////////////////////////////////////////////////////
<telerik:RadPane Header="Pane 1">
                            <telerik:RadPane.CommandBindings>
                                <CommandBinding Command="Open" Executed="CommandBinding_Executed" CanExecute="CommandBinding_CanExecute"/>
                            </telerik:RadPane.CommandBindings>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                <telerik:RadToolBar MaxHeight="40" Grid.Row="0">
                                    <Button Command="telerik:RadDockingCommands.Close" Content="Close" MaxHeight="20" MaxWidth="40"/>
                                    <Button Command="Open" Content="Open" MaxHeight="20" MaxWidth="40"/>
                                </telerik:RadToolBar>
                            </Grid>
                        </telerik:RadPane>

private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            e.Handled = true;
        }


        private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
            e.Handled = true;
        }


////////////////////////////////////////

Thank you in advance
Vladi
Telerik team
 answered on 01 Nov 2012
1 answer
164 views

Hello,

way does the binding on the Visibility property not work? 

below my code, I'm using RadControls for WPF Q2 2012 SP1\Binaries\WPF40\Telerik.Windows.Controls.Charting.dll

thanks!

<telerik:RadChart x:Name="RCVUtilizationAverage" Grid.Column="0" >
     <telerik:RadChart.SeriesMappings>
         <telerik:SeriesMapping LegendLabel="Plan-Auslastung" ItemsSource="{Binding PlanUtilizations}">
              <telerik:SeriesMapping.SeriesDefinition>
                   <telerik:LineSeriesDefinition ShowItemLabels="False" Visibility="{Binding PlanUtilizationsVisibility, Mode=TwoWay}" />
               </telerik:SeriesMapping.SeriesDefinition>
....

private SeriesVisibility _PlanUtilizationsVisibility = SeriesVisibility.Visible;
public SeriesVisibility PlanUtilizationsVisibility { 
    get { return _PlanUtilizationsVisibility; } 
    set { _PlanUtilizationsVisibility = value; } 
}



Nikolay
Telerik team
 answered on 01 Nov 2012
1 answer
203 views
In the application I'm currently developing for, we are using the the WPF RadRichTextBox as an Html editor, in which documents are synced to a server and accessed from many different computers.

In order to handle embedded images (ImageInlines), we associate each image with a content id number, which is stored on the server.  My problem comes into effect when the user downloads a document (along with it's embedded images) from the server, since the content id number is stored in place of the src attribute on the Html <image> tag. The Telerik control parses the image tag fine, and simple displays an image placeholder due to the content id being an invalid path, so I loop through the Document's ImageInlines and replace the src attribute with a proper filepath:
           
IEnumerable<ImageInline> inlines = document.EnumerateChildrenOfType<ImageInline>();
foreach (ImageInline image in inlines)
{
    image.UriSource = new Uri(GetLocalPath(image.UriSource.AbsolutePath);
}

The problem then is that the RichTextBox control doesn't seem to update to show the image at the given path (even though I have verified, by exporting and inspecting the Html, that the src attribute points to a valid image file).  Is there some sort of "force update" that I need to perform, or perhaps a step I'm missing? Or is there possibly just a better way of doing something along these lines?

Thanks,
Chris Covert
Petya
Telerik team
 answered on 31 Oct 2012
3 answers
370 views
While creating corresponding WPF libraries for our Sliverlight ones, I ran across an issue. One of our views uses a RadTreeView with HierarchicalDataTemplates. In Silverlight, it works fine using the Telerik.Windows.Controls.HierarchicalDataTemplate. That same view will not compile in the WPF assembly because Telerik.Windows.Controls.HierarchicalDataTemplate does not seem to exist for WPF. I know there's a Windows HierarchicalDataTemplate, but I can't seem to find the Telerik one anywhere. 

If this type does not exist, your documentation for ItemTemplateSelector might need to be updated as well:
http://www.telerik.com/help/wpf/radtreeview-populating-with-data-item-template-selector.html

That article shows it's usage, but again, I can't find that type anywhere in the Telerik WPF assemblies. I'm using the latest 2011 Q3 release, btw.

Thanks in advance...
-Tony
Tina Stancheva
Telerik team
 answered on 31 Oct 2012
5 answers
600 views
Hi Telerik,

I'm having trouble getting the calendar to reselect template for the calendarbuttoncontent after initial load.

I've found that if I "browse" the calendar (so that the content is not shown) and back again, the template is reapplied, using updated information in my behind lists of dates.

I have created the following template selector:

public class CalendarButtonTemplateSelector : DataTemplateSelector
{
    public override DataTemplate SelectTemplate(object item, DependencyObject container)
    {
        CalendarButtonContent content = item as CalendarButtonContent;
        if (content != null && content.ButtonType == CalendarButtonType.Date)
        {
            if (CentralCalendarWindow.CalendarViewItems != null && CentralCalendarWindow.CalendarViewItems.Exists(c => c.Date == content.Date))
            {
                CalendarViewItem calendarViewItem = CentralCalendarWindow.CalendarViewItems.Find(c => c.Date == content.Date);
                if (calendarViewItem.Holiday)
                {
                    return HolidayTemplate;
                }
                else if (calendarViewItem.NoDistribution)
                {
                    return NoDistributionTemplate;
                }
                else if (calendarViewItem.PartlyNoDistribution)
                {
                    return PartlyNoDistributionTemplate;           
                }
            }
        }
        return DefaultTemplate;
    }
    public DataTemplate DefaultTemplate { get; set; }
    public DataTemplate HolidayTemplate { get; set; }
    public DataTemplate NoDistributionTemplate { get; set; }
    public DataTemplate PartlyNoDistributionTemplate { get; set; }
}

In XAML i bind to the selector as a static resource like this:

DayTemplateSelector="{StaticResource templateSelector}"

And my template selection is like this:

<this:CalendarButtonTemplateSelector x:Key="templateSelector"
      DefaultTemplate="{StaticResource dataTemplateDefault}"
      HolidayTemplate="{StaticResource dataTemplateHoliday}"
      NoDistributionTemplate="{StaticResource dataTemplateNoDistribution}"
      PartlyNoDistributionTemplate="{StaticResource dataTemplatePartlyNoDistribution}"/>


Now the question - How can I explicitly have the calendar redo its template selection, like it does when the content gets redrawn when "browsing" the calendar.

And what I would really want to do is to only redo the template selection on specific days if possible.

Thanks in advance!
Best regards,
Kasper Schou
Konstantina
Telerik team
 answered on 31 Oct 2012
3 answers
231 views
Hi,

I 'm actually designing a new WPF application based on RadControls Q2 2012 with VS2012 RC / windows 7.
I would like to customize RadGridView styles. I imagine that using Blend would simplify the task.
The problem is that Blend 5 does not support wpf nor silverlight projects on windows 7:
See this link http://social.expression.microsoft.com/Forums/en-US/blend/thread/8cdd9710-8aa0-4fea-aef8-ce2709a8f5d8

How could I easily customize the RadControls Q2 2012 styles?
Thank's for your help.
JC
Jc
Top achievements
Rank 1
 answered on 31 Oct 2012
0 answers
84 views
Hi,
i need binding string value to PropertyDefinition in code:
no binding from obj or class, set value for show for this property.
In My Project i have diffrent property for diffrent Class and i have many diffrent class that creating from database in runtime.
i want add property and value behinde code and not with binding , i want fill propertygrid manually.
the other word i want read property name and value from database and show in propertyGrid
If can get me sample code ,

Please helpe me. 
 Thanks
Pv
Top achievements
Rank 1
 asked on 31 Oct 2012
0 answers
118 views
Hi Staff, 
    how to handle the event when a user delete a part of a text or a InlineUIContainer element?

Thank you in advice.

A.
Alberto
Top achievements
Rank 1
 asked on 31 Oct 2012
0 answers
101 views
hi,
i've integrated dynamic language switching into my project. I use the radgridview with the filtering options. I've noticed the filter does not have the required language resources for italian (although there is an italian language pack). it works fine with english/german/french/spanish so i'm just guessing the translation has been forgotten, or something went wrong with the dll.

i am using 2012.3.1017 wpf40
marc
Top achievements
Rank 1
 asked on 31 Oct 2012
1 answer
217 views
Hi Telerik

Is there any way of creating the chart as per attached image. We want to colour the difference between two line charts.

Rav
Petar Marchev
Telerik team
 answered on 31 Oct 2012
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?