Telerik Forums
UI for WPF Forum
1 answer
125 views
I know there are some limitations on pictures, encoding and other things, but would it be possible to show an error message saying it's can't load this pdf?  99% of the files I think will work, but if a client tries to use a file that doesn't load correctly I'd like it to give an error message and say to download the file instead.
Kammen
Telerik team
 answered on 01 Feb 2013
5 answers
443 views
Hi,

in my project I have a method who need parameters and one of them is an object that I want the persistence stream result.
When I call my method, the PersistenceError event handler was called when I try to use the SAVE method of the PersistenceManager and I get the following french error message: Nombre de paramètres incorrects.

Here is the way I call my method:

PersistenceStorage

 

.Persist(MainGrid, ref stream, PersistenceStorage.PersistenceAction.Save, out errMsg);

 



Here is my static object with my method:

static

 

public class PersistenceStorage

 

{


static public bool Persist(object pObject, ref Stream pStream, PersistenceAction pPersistenceAction, out string pErrorMessage)

 

{

mResult =

true;

 

pErrorMessage =

string.Empty;

 

 

PersistenceManager manager = new PersistenceManager();

 

manager.PersistenceError +=

new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);

 

 

try

 

{

 

if (pPersistenceAction == PersistenceAction.Load)

 

{

 

if (pObject != null && pStream != null)

 

{

pStream.Position = 0L;

manager.Load(pObject, pStream);

}

 

else

 

{

mResult =

false;

 

}

}

 

else if (pPersistenceAction == PersistenceAction.Save)

 

{

 

if (pObject != null)

 

{

pStream = manager.Save(pObject);

}

 

else

 

{

mResult =

false;

 

}

}

}

 

catch

 

{

mResult =

false;

 

}

 

finally

 

{

manager.PersistenceError -=

new Telerik.Windows.Persistence.Events.PersistenceErrorEventHandler(manager_PersistenceError);

 

pErrorMessage = mErrorMessage;

}

 

return mResult;

 

}

 


static
void manager_PersistenceError(object sender, Telerik.Windows.Persistence.Events.PersistenceErrorEventArgs e)

 

{

mErrorMessage = e.Exception.Message;

mResult =

false;

 

}

 


public
enum PersistenceAction { Load, Save }

 

 


static
private string mErrorMessage;

 

 

static private bool mResult;

 

}

Tina Stancheva
Telerik team
 answered on 01 Feb 2013
3 answers
144 views
Hi

I want to be able to drop a file from the desktop on to an existing row in a RadGridView. (The event handler will then do something with the file and manipulate the data for that specific row, but that isn't relevant for this discussion.)

Can anybody shed some light on how this can be achieved? I have managed to drop a file on the the RadGridView component itsself, but that's not what I want. I need to be able to drop on a specific row (or preferably have the option to drop on the RadGridView also if it doesn't conflict).

I am finding the Telerik documentation about drag and drop (using DragDropManager) hard to figure out since some of the examples just don't work (http://www.telerik.com/help/wpf/dragdropmanager-getting-started.html) and many of the example projects referred to in prior forum solutions seem to use the RadDragAndDropManager which I understand is soon to be obsoleted.

Anybody? 
Nick
Telerik team
 answered on 01 Feb 2013
0 answers
86 views

We are facing a problem while adding steps in Test studio.

When we are working web and wpf at a time we are not a able to add new steps into Wpf test and while adding the code which is lies in Webtest that is deleting.

Please let me know solution for this problem.

Please find the attachment of error message which we are getting while adding steps.

satyanarayana
Top achievements
Rank 1
 asked on 01 Feb 2013
2 answers
174 views
Is there a property like EnableNavigation of asp.net RadCalendar for the WPF RadCalendar?
if not, how can I disable the title navigation's buttons?

thanks.
Ed
Top achievements
Rank 1
 answered on 31 Jan 2013
1 answer
238 views

public override bool RemoveItem(FilterNode node)
{
    return base.RemoveItem(node); // This method call produces the error output below
}

System.Windows.Data Error: 40 : BindingExpression path error: 'Visibility' property not found on 'object' ''DiagramViewModel' (HashCode=33233561)'. BindingExpression:Path=Visibility; DataItem='DiagramViewModel' (HashCode=33233561); target element is 'MyChartShape' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Error: 40 : BindingExpression path error: 'IsSelected' property not found on 'object' ''DiagramViewModel' (HashCode=33233561)'. BindingExpression:Path=IsSelected; DataItem='DiagramViewModel' (HashCode=33233561); target element is 'MyChartShape' (Name=''); target property is 'IsSelected' (type 'Boolean')

I have a shape style that does some binding:

<Style TargetType="views:MyChartShape" x:Key="MyShapeStyle">
        <Setter Property="Visibility" Value="{Binding Visibility, Mode=TwoWay}" />
        <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />


Probably not critical, but I believe these errors could indicate a performance issue. The node's shape is obviously rendered when it has been removed (along with its DataContext).

Tina Stancheva
Telerik team
 answered on 31 Jan 2013
3 answers
330 views
I want all my RadTabItem views to be built immediately. Currently, the visual tree is built when the tab is selected:

<telerik:RadTabControl
                       IsContentPreserved="True"
                       IsSynchronizedWithCurrentItem="True"

                       SelectedIndex="{Binding CurrentTabIndex}"
                       DropDownDisplayMode="Visible" IsTabStop="True">
  <telerik:RadTabItem Header="A" IsSelected="True">
    <views:MyView1 />
  </telerik:RadTabItem>
  <telerik:RadTabItem Header="B">
    <views:MyView2 />
  </telerik:RadTabItem>
  <telerik:RadTabItem Header="C">
    <views:MyView3 />
  </telerik:RadTabItem>
</telerik:RadTabControl>

I want all tabs, "A", "B" and "C", to be created immediately. (This is essential for one very complex problem that I'm trying to solve here.)
Hristo
Telerik team
 answered on 31 Jan 2013
1 answer
197 views
This is probably a basic WPF question, and not specifically Telerik related, but I figured I'd ask here. I am trying to create a reusable control, right now named SectionLayout, which allows the user of the control to define "sections", with Visuals in each section. I want to render this using RadTabControl.

Basically, the consumer of the SectionLayout would be using it like this:

<local:SectionLayout>
  <local:Section Name="Foo">
    <Button Text="{Binding Foo}" />
  </local:Section>
</local:SectionLayout>

I've already got most of it working. SectionLayout has a "Sections" property, of type SectionCollection, that holds items of type Section. Section has Name and Content properties. Name is a string, Content is an object.

The ControlTemplate for SectionLayout currently looks like this:

<ControlTemplate>
<telerik:RadTabControl
    Align="Right"
    TabOrientation="Vertical"
    TabStripPlacement="Left"
    ItemsSource="{TemplateBinding Sections}">
    <telerik:RadTabControl.ItemContainerStyle>
        <Style
            TargetType="{x:Type telerik:RadTabItem}">
            <Setter
                Property="MinHeight"
                Value="150" />
            <Setter
                Property="MinWidth"
                Value="30" />
        </Style>
    </telerik:RadTabControl.ItemContainerStyle>
    <telerik:RadTabControl.ItemTemplate>
        <DataTemplate>
            <TextBlock
                Text="{Binding Name}" />
        </DataTemplate>
    </telerik:RadTabControl.ItemTemplate>
    <telerik:RadTabControl.ContentTemplate>
        <DataTemplate
                DataType="{x:Type local:Section}">
            <ContentPresenter
                Margin="4,4,4,4"
                DataContext="{TemplateBinding DataContext}"
                Content="{Binding Content}" />
        </DataTemplate>
    </telerik:RadTabControl.ContentTemplate>
</telerik:RadTabControl>
</ControlTemplate>

So, basically I'm just making an easier interface to use a RadTabControl. So I can reuse it in other places. Though it might change from being a RadTabControl to something else in the future.

The problem I'm having is getting the original DataContext of Section.Content property to flow into the RadTabControl.ContentTemplate. The ContentTemplate is of course given the business object (Section) as it's datacontext. So, I can easily present Section.Content. However, when I do so, Section.Content begins inheriting the DataContext given to it by the ContentPresenter, which happens to be Section.Content.

How can I do this properly? I want the user to be able to use my control as he would any normal layout control: Grid, Canvas, StackPanel, whatever. But, I need to use a TabControl internally to do the layout.
Pavel R. Pavlov
Telerik team
 answered on 31 Jan 2013
8 answers
387 views
Just so you know, there are multiple errors here: http://www.telerik.com/help/wpf/radchartview-axes-datetimeaxes.html (XAML and VB).
Denis
Top achievements
Rank 1
 answered on 31 Jan 2013
3 answers
303 views
Hi,

I'm using RadPivotGrid with Column Group:

            <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
                <pivot:PropertyGroupDescription PropertyName="Periodo" CustomName="Período" SortOrder="Descending" />
            </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>

As the attachement image shows, I've put the total before column groups. It's a native control feature.

Now I want:

1 - That totals  cells have lines like group cells;
2 - Alternating backgroung color for group cells. Example: group A cells background diferent from group B cells background.

How can I achieve this?
Rosen Vladimirov
Telerik team
 answered on 31 Jan 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?