Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6848961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:55:56+00:00 2026-05-27T00:55:56+00:00

I have tab control one tab contains DataGrid second ColumnSeries chart when i press

  • 0

I have tab control one tab contains DataGrid second ColumnSeries chart when i press when i press charts tab i’m getting such error:

Cannot convert the value in attribute ‘Property’ to object of type ‘System.Windows.DependencyProperty’.
Failed to create a ‘DependencyProperty’ from the text ‘Background’.

i don’t have any event on tab control, this is my DataGrid:

<TabControl Name="tabControl1">
    <TabItem Name="tabItem1" Header="Logs">
        <Grid>
            <Grid Background="#FFABABAB">
                <Border Name="border1" BorderBrush="Silver" BorderThickness="1" Height="92" VerticalAlignment="Top" Background="AliceBlue" Margin="0,0,1,0">
                    <Grid>
                        <Button Name="btnGridToExcel" Content="Export To Excel" Height="23" HorizontalAlignment="Left" Margin="639,58,0,0" VerticalAlignment="Top" Width="92" Click="btnGridToExcel_Click" />
                        <Button Name="btnReset" Content="Reset/Refresh" Height="23" HorizontalAlignment="Left" Margin="639,24,0,0" VerticalAlignment="Top" Width="92" Click="btnReset_Click" />
                    </Grid>
                </Border>
                <DataGrid Name="dataGrid1" AutoGenerateColumns="false" Margin="0,91,1,32" SelectedValuePath="ID" SelectionMode="Extended" 
                          SelectionUnit="CellOrRowHeader" CanUserReorderColumns="false" CanUserAddRows="false" CanUserDeleteRows="false" 
                          IsReadOnly="true" AlternatingRowBackground="#FFF2F4F4" RowBackground="#FFE0E4E3" ItemsSource="{Binding ActionCollection}" 
                          SelectedCellsChanged="dataGrid1_SelectedCellsChanged" >
                    <DataGrid.ContextMenu>
                        <ContextMenu>
                            <MenuItem Name="MenuItemEdit" Header="Edit" Click="MenuItemEdit_Click">
                                <MenuItem.Icon>
                                    <Image Source="/H-Pro;component/Images/1314285611_edit.png"/>
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem Name="MenuItemDelete" Header="Delete" Click="MenuItemDelete_Click">
                            <MenuItem.Icon>
                                    <Image Source="/H-Pro;component/Images/1314285495_dialog-close.png"/>
                            </MenuItem.Icon>
                            </MenuItem>
                            <Separator />
                            <MenuItem Name="MenuItemPayment" Header="Pay selected" Click="MenuItemPayment_Click">
                                <MenuItem.Icon>
                                    <Image Source="/H-Pro;component/Images/1314875051_money_dollar.png"/>
                                </MenuItem.Icon>
                            </MenuItem>
                        </ContextMenu>
                    </DataGrid.ContextMenu>
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="ID" Binding="{Binding Path=ID, Mode=OneWay}" />
                        <DataGridTextColumn Header="RoomType" Binding="{Binding Path=RoomType, Mode=OneWay}" />
                        <DataGridTextColumn Header="Room" Binding="{Binding Path=RoomNumber, Mode=OneWay}" />
                        <DataGridTextColumn Header="Guest" Binding="{Binding Path=GuestName, Mode=OneWay}" />
                        <DataGridTextColumn Header="Persons" Binding="{Binding Path=Person, Mode=OneWay}" />
                        <DataGridTextColumn Header="Check In" Binding="{Binding Path=CheckInDate, Mode=OneWay}" />
                        <DataGridTextColumn Header="Check Out" Binding="{Binding Path=CheckOutDate, Mode=OneWay}" />
                        <DataGridTextColumn Header="Room Price" Binding="{Binding Path=RoomPriceWithCurrency, Mode=OneWay}" />
                        <DataGridCheckBoxColumn Header="Inc. First Day" Binding="{Binding Path=IncFirstDay, Mode=OneWay}" />
                        <DataGridTextColumn Header="Discount %" Binding="{Binding Path=Discount, Mode=OneWay}" />
                        <DataGridTextColumn Header="Discounted Price" Binding="{Binding Path=DiscountedPriceWithCurrency, Mode=OneWay}" />
                        <DataGridTextColumn Header="Rate" Binding="{Binding Path=Rate, Mode=OneWay}" />
                        <DataGridTextColumn Header="Total Days" Binding="{Binding Path=TotalDays, Mode=OneWay}" />
                        <DataGridHyperlinkColumn Header="Services" Binding="{Binding Path=TotalServiceCount, Mode=OneWay}" >
                            <DataGridHyperlinkColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <EventSetter Event="Hyperlink.Click" Handler="DG_Hyperlink_Click" />
                                </Style>
                            </DataGridHyperlinkColumn.ElementStyle>
                        </DataGridHyperlinkColumn>
                        <DataGridTextColumn Header="Total Price" Binding="{Binding Path=TotalPrice, Mode=OneWay}" />
                        <DataGridTextColumn Header="Total Price in Gel" Binding="{Binding Path=TotalPriceInGel, Mode=OneWay}" />
                        <DataGridTextColumn Header="Paid" Binding="{Binding Path=PaidMoney, Mode=OneWay}" />
                        <DataGridTextColumn Header="Debt" Binding="{Binding Path=Debt, Mode=OneWay}" />
                        <DataGridTextColumn Header="Invoice #" Binding="{Binding Path=InvoiceNumber, Mode=OneWay}" />
                    </DataGrid.Columns>
                    <DataGrid.GroupStyle>
                        <GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}">
                            <GroupStyle.Panel>
                                <ItemsPanelTemplate>
                                    <DataGridRowsPresenter />
                                </ItemsPanelTemplate>
                            </GroupStyle.Panel>
                        </GroupStyle>
                    </DataGrid.GroupStyle>
                </DataGrid>
            </Grid>
        </Grid>
    </TabItem>
</TabControl>

and Chart:

<TabItem Header="Statistic">
    <ScrollViewer>
        <Grid Background="White">
            <Button Name="button1" Content="Button" Height="23" HorizontalAlignment="Left" Margin="348,6,0,0" VerticalAlignment="Top" Width="75" />
                <charting:Chart Name="ChartGuests66" Margin="6,48,87,262" Width="862" Height="451">
                    <charting:AreaSeries DependentValuePath="Value" IndependentValuePath="Key" Background="Red">
                    <charting:DataPointSeries.ItemsSource>
                        <Binding BindsDirectlyToSource="True"/>
                    </charting:DataPointSeries.ItemsSource>
                </charting:AreaSeries>
            </charting:Chart>
        </Grid>
    </ScrollViewer>
</TabItem>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:55:57+00:00Added an answer on May 27, 2026 at 12:55 am

    I think your issue is caused inside the areaSeries with Background=”Red”. The DataPointStyle actually has the background.

    Remove that temporarily and if it solves your problem then I think you want to access the DataPointStyle of your area series to set the background.

    Check this out:
    wpf Area Chart with Different Colors?

    Edit: Removed my xaml example, as a direct setting in place of styles does work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have next problem: There is jquery accordion control. One of tab have div
I have a TabControl that contains several tabs. Each tab has one UserControl on
I have an activeX control that contains one window that has streaming video being
I have used Ajax Tab Control in one of my pages. It has got
I have a resizable dialog that contains a CTabCtrl, the tab control has 4
I have a tab contol with two tabs. Each one containing listviews. When the
I have a Tab Control with multiple Tab Pages. I want to be able
I have a tab control bound to an observablecollection for dynamic tabs as follows:
using jquery v1.3.2 and jQuery UI 1.7.1 I have 1 tab control with 3
I have a tab navigator control and I would like to make all of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.