Telerik Forums
UI for WPF Forum
5 answers
304 views

Hi,

 I am using a RadCartesianChart for displaying ScatteredLineSeries. Here is my Xaml.

<telerik:RadCartesianChart.Behaviors>
               <telerik:ChartPanAndZoomBehavior DragMode="Pan" ZoomMode="Both" PanMode="Both" />
               <telerik:ChartTooltipBehavior />
           </telerik:RadCartesianChart.Behaviors>

  How can i change the cursor on Zoom and Pan?

Petar Marchev
Telerik team
 answered on 07 Sep 2016
1 answer
208 views

Where can i get Telerik.Windows.Diagrams.Core.xaml. I cannot find it in:

C:\Program Files (x86)\Telerik\UI for WPF Q1 2016\Themes.Implicit\WPF40\Vista\Themes

Thanks

Petar Mladenov
Telerik team
 answered on 07 Sep 2016
4 answers
115 views

Hello. When I want to close RadPain and click 'Close' button ('X') in right upper corner of the RadPain then this RadPain is not closed. Below is XAML where RadPain is:

<UserControl x:Class="DeviceReading.Views.DeviceReadingView"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:prism="http://prismlibrary.com/"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             prism:ViewModelLocator.AutoWireViewModel="True">
 
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
         
        <StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Stretch" Margin="0 5 0 3" Orientation="Horizontal">
            <CheckBox Content="Gas velocity" Command="{Binding Path=ShowHideGasVelocityChartViewCommand}" CommandParameter="{Binding Path=IsChecked, RelativeSource={RelativeSource Self}}"/>
        </StackPanel>
        <telerik:RadDocking Grid.Row="1" Grid.Column="0" x:Name="Docking">
             <telerik:RadSplitContainer>
                <telerik:RadPaneGroup>
                    <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}" Header="Gas Velocity"
                        prism:RegionManager.RegionName="GasVelocityChartRegion" IsHidden="{Binding IsGasVelocityChartHidden, Mode=TwoWay}"/>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Grid>
</UserControl>

Below is the definition of ShowHideGasVelocityChartViewCommand command that is bound to Command property of CheckBox:

public DelegateCommand<object> ShowHideGasVelocityChartViewCommand { get; private set; }
private void showHideGasVelocityChartView(object parameter)
{
   if ((bool)parameter == true)
      this.IsGasVelocityChartHidden = true;
   else
      this.IsGasVelocityChartHidden = false;
}

Below is the definition of IsGasVelocityChartHiden property that is bound to IsHidden property of the RadPain.

public bool IsGasVelocityChartHidden
{
   get { return this._isGasVelocityChartHidden; }
   set { this.SetProperty(ref this._isGasVelocityChartHidden, !value); }
}

During application runtime, this RadPain contains View with the dynamically changed chart of gas velocity. This RadPain is shown and hidden by the click on the CheckBox (when the CheckBox is checked then the RadPain is visible, but when the CheckBox is unchecked then the RadPain is invisible - hidden). But I want that this RadPain can ALSO be hidden by clicking of its 'Close' ('X') button that is in the right upper corner of this RadPain. And when the RadPain is closed by clicking its 'Close' ('X') button then the CheckBox must set to Unchecked status so that after I can click on CheckBox, set it to 'Checked' status and visualize the RadPain again. Please help me if this is possible to do it.

Nasko
Telerik team
 answered on 07 Sep 2016
2 answers
132 views

Hi,

    The validation is working alright with viewmodel bound to PropertyGrid. But it is not working when it is bound to CollectionEditor. (See attached picture)

    Can you share some example on how to do that? 

Joel
Top achievements
Rank 1
Iron
 answered on 07 Sep 2016
5 answers
1.2K+ views

I have a grid view that is data bound to a collection of objects, The grid gets refreshed every 30 seconds, we are getting he data from rest service and we create new objects for every refresh.

If user selects a row, I want to keep that selection after the refresh, I have my own logic to remember the last item and after the itemsource is updated I set the selectedItem to the previously selecteditem

But the problem is that after the data is loaded there is a selected item change event raised by the grid and it sets the selection to first row, I know this is because i have set IsSynchronizedWithCurrentItem="True", But i need that to show the row indicator, Also if i do not set that to true the row is selected but it does not have any focus, I mean visually you can tell that the row is selected it does not have the border or selected item color.

Is there any way that I can keep IsSynchronizedWithCurrentItem="True" and also set the selected item after the refresh and after the grid has raised its last selected item changed event.

The order of events is like this

- Update collection, - i set previous item - grid set the item to null - then grid set the item to first row

 

Vikas
Top achievements
Rank 1
 answered on 06 Sep 2016
2 answers
135 views

I am running into weird layout problem with Chart view and grid splitter, I have user control with a grid with 3 columns. I have a a grid in first column grid splitter in 2nd and chart view and third

Everything looks good when the window is first rendered, But if i move the splitter to make the 3rd column big the chart view keeps expanding, I mean the labels on x axis keep getting farther apart.

It would be ok as long as I can stretch the column, but if i just keep moving mouse the chart labels keeps moving.

 

I have attached some images to give you a better idea

 

Vikas
Top achievements
Rank 1
 answered on 06 Sep 2016
2 answers
107 views

I have a live chart with a DateTimeContinuousAxis axis and a crosshair.

When new data arrives and the chart area scrolls the crosshair info does update until the mouse is moved.

Is there a way to update the crosshair labels from code?

/Flemming Rosenbrandt

Flemming
Top achievements
Rank 1
 answered on 06 Sep 2016
2 answers
85 views

I am trying to see if the ScheduleView could be customized enough to be used for scheduling of Shifts.  Basically, what we have is a tree like this:

<Schedule>
   <Plants>
      <Plant>
          <Sections>
               <Section Name="Warehouse">
                   <Shifts>
                       <Shift Name="Shift 1">
                          <ScheduledItems>
                              <ScheduledItem Name="Some Task1" Type="Maintence" StartTime="6:00 am" EndTime="8:00 am" />
                              <ScheduledItem Name="Some Task2" Type="Retool" StartTime="6:00 pm" EndTime="8:00 pm" />
                          </ScheduledItems>
                       </Shift>
                       <Shift Name="Shift 2">
                          <ScheduledItems>
                              <ScheduledItem Name="Some Task1" Type="Maintence" StartTime="6:00 am" EndTime="8:00 am" />
                          </ScheduledItems>
                       </Shift>
                   </Shifts>
               <Section Name="Back Office" />
               <Section Name="Front Office" />
          <Sections>
      </Plant>
   </Plants>
</Schedule>

I have attached an image of what I am trying to accomplish.  Basically, you only schedule items at the Shift level.  You can't add items to Plant or Section.  That is simply to show grouping of them as a whole.  So this would also allow the user to show only one Plant at time if they wanted.

I am hoping I can get some guidance on if it is possible and how could I make the headers on the left and be grouped like this?  If I could do this, this would be HUGE!!!

 

 

Yana
Telerik team
 answered on 06 Sep 2016
2 answers
142 views

Hello all,

I recently started a trial for the Telerik WPF control suite and am experimenting with the DataPager. As I understand, it should be able to load server-side paged data. I however cannot even start and try to bind it to my view, as the ctor for the QueryableCollectionView() throws exceptions for what seems to be a correct IQueryable. I'm using the EF Core 1.0 with Sqlite. Perhaps this is not supported? EF 6 seems to work fine.

 

My DbContext and Test entity (doesn't get any simpler than this):

    public class Test
    {
        public int Id { get; set; }
    }

    public sealed class CRMMirrorContext2 : DbContext
    {
        #region Constructors, Destructors

        public CRMMirrorContext2()
        {
            Database.EnsureCreated();
        }

        public DbSet<Test> Tests { get; set; }

        #endregion

        #region Other Methods

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            try
            {
                var connectionString = @"Filename=C:\Temp\test.db";
                optionsBuilder.UseSqlite(connectionString);
            }
            catch (Exception)
            {
                // TODO: log/handle error
            }
        }

        #endregion
    }

 

I'm instantiating the QueryableCollectionview like this in my VM:

public CalendarViewModel()
        {
            this.InitializeProperties();
            this.InitializeCommands();
            using (var context = new CRMMirrorContext2())
            {
                var c = new QueryableCollectionView(context.Tests);
            }
        }

See attach for the exception message, hope you guys can help out with this. 

Thanks in advance.

Joseph
Top achievements
Rank 1
 answered on 05 Sep 2016
4 answers
120 views

Hi,

When you disable the Gridview (DataGridView.Enabled = false) the scrollbars are still there, everything is still enabled.

Only the user is not able to click on the element.

This is not according to the Microsoft guidelines. I would expect that the element is grayed out, and the scrollbars should be hidden automatically.   (bug)

W
Top achievements
Rank 1
 answered on 05 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?