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

  • SEARCH
  • Home
  • 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 3669698
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:16:29+00:00 2026-05-19T02:16:29+00:00

I have a DataGrid and two StaticResource . I want to bind RowStyle of

  • 0

I have a DataGrid and two StaticResource.

I want to bind RowStyle of DataGrid to one of two StaticResources.

RowStyle="{StaticResource {Binding Status, Converter={StaticResource MyConverter}}}"

MyConverter returns StaticResource’s Key.

But I get this error:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

  • 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-19T02:16:30+00:00Added an answer on May 19, 2026 at 2:16 am

    The Static Resource key is not a value that can be assigned Dynamically. The name of the key needs to inline in the Xaml.

    The correct approach is this:-

    RowStyle="{Binding Status, Converter={StaticResource MyConverter}}" 
    

    Where the converter that is stored against the “MyConverter” key returns a Style object. Note you could add a property of type ResourceDictionary to you converter and place you styles in that dictionary for you converter to lookup.

    In fact I have already written a converter capable of this here.

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

Sidebar

Related Questions

I have two datagrids with one column each. First: <DataGrid.Columns> <DataGridTextColumn x:Name=FilterTextCol01 IsReadOnly=False Width={Binding
I have a DataGrid with two way binding and not sure why this does
I have a Silverlight datagrid where two of the columns are comboboxes. One of
I have a DataGrid that two of its columns are ComboBoxes (one contains few
Can i add two header text in Datagrid? My Requirement is to have two
I have a datagrid getting bound to a dataset, and I want to display
I have a DataGrid, populated with objects in an ArrayCollection. After updating one of
I have a simple DataGrid which I want the user to add some rows
I have a SL DataGrid that has two columns. I need to be able
I have a datagrid with 2 columns. One column contains role information, the other

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.