- Dali::ImageAttributes backgroundAttributes;
- backgroundAttributes.SetSize( stage.GetSize() );
- backgroundAttributes.SetFilterMode( Dali::ImageAttributes::BoxThenLinear );
- backgroundAttributes.SetScalingMode( Dali::ImageAttributes::ScaleToFill );
- Dali::Image backgroundImage = Dali::ResourceImage::New( backgroundImagePath, backgroundAttributes );
- Dali::ImageActor backgroundImageActor = Dali::ImageActor::New( backgroundImage );
- view.SetBackground( backgroundImageActor );
+ Dali::Property::Map map;
+ map[Dali::Toolkit::Visual::Property::TYPE] = Dali::Toolkit::Visual::IMAGE;
+ map[Dali::Toolkit::ImageVisual::Property::URL] = backgroundImagePath;
+ map[Dali::Toolkit::ImageVisual::Property::DESIRED_WIDTH] = stage.GetSize().x;
+ map[Dali::Toolkit::ImageVisual::Property::DESIRED_HEIGHT] = stage.GetSize().y;
+ map[Dali::Toolkit::ImageVisual::Property::FITTING_MODE] = Dali::FittingMode::SCALE_TO_FILL;
+ map[Dali::Toolkit::ImageVisual::Property::SAMPLING_MODE] = Dali::SamplingMode::BOX_THEN_LINEAR;
+ map[Dali::Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
+ view.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );