RenderTransform
I need to do moving elements inside the Grid, in c# I use RenderTransform, but when I try to use it in c++ I get an error: "Cannot set 'Matrix' property on object 'MatrixTransform' because it is in a read-only state";
Code: Select all
void TestNoesis::MoveButton_PreviewMouseMove(Noesis::BaseComponent* sender, const Noesis::MouseEventArgs& e)
{
Grid* rootGrid = (Grid*)this->GetParent();
MatrixTransform* transform = (MatrixTransform*)this->GetRenderTransform();
Transform2f mtx = transform->GetMatrix();
float x = 0;
float y = 0;
mtx.Translate(x, y);
transform->SetMatrix(mtx);
this->SetRenderTransform(transform);
}
Re: RenderTransform
I should have added
Code: Select all
<Grid.RenderTransform>
<TranslateTransform />
</Grid.RenderTransform>
-
-
sfernandez
Site Admin
- Posts: 2058
- Joined:
Re: RenderTransform
Yes, the default value for RenderTransform property is the Identity transform, that is a frozen MatrixTransform.
So if you want to change it you should provide the appropriate transform type as you found.
Marking this as solved.
So if you want to change it you should provide the appropriate transform type as you found.
Marking this as solved.
Who is online
Users browsing this forum: Rocko Bonaparte and 0 guests